Parameterized Database Query

I try to simulate Database Looping node in KNIME 3.7.2.
First, I generated string like ‘1’,‘2’,‘3’ and submitted it as parameter to Parameterized Database Query with SQL like
select * from Table1
where Number in ($T_Numbers$)
Node returns no result.
In MS-Management Studio
select * from Table1
where Number in ( ‘1’,‘2’,‘3’ ) produces expected result.

Question, how I can see SQL generated by Parameterized Database Query and how to fix my parameter to make it work?
Thank you

I found the way using SQL like operator. Anyway, the variable containing list of values has restricted length. How I can build more universal solution reading list of parameters to temp table and use SQL like this:

select * from Table1
where Number in (select Values from #Temp_Table)

Hi @izaychik63,
why do you not implement a chunk loop start node followed by an group by node to concatenate the values to an variable criteria string? Followed by an loop end and tablerow to variable node you can inject the variable into your sql string.

See this thread were I asked about database looping as well and here the solution provided by Tobias.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.