Unexpected behavior: One String type flow variable split into "an integer + string" during the processing

Hi all,

I had a strange case for flow variable usage here.

I used a "Table Row To Variable Loop Start" node to create following 2 flow variables.

First row values are: 

username" (STRING: 12cowboy12) 12cowboy12
usageEventDate" (STRING: 20170503) 20170503

The next node I used is "Database Reader". I found the result is not as expected.

So I changed the query to "select $${Susername}$$"

The returning result turns to be an integer:

12

Anybody saw this before? Any solution?

 

Thanks,

Sharon

If you don't quote the variable in your SQL statement then it seems the database tries to interpret it as a number. The statement will look like

SELECT 12cowboy12

whereas I assume you want something like

SELECT '12cowboy12'