cancel
Showing results for 
Search instead for 
Did you mean: 

how to use dynamic arguments for in clause for sql for datawindow?

Former Member
0 Kudos

I have datawindow with sql like:

select c1, c2, ... from mytab where id = :arg1.

id is integer.

Then I want to change the query like:

select c1, c2, ... from mytab where id  in ( 1, 2, 3)

the number of ID value is dynamic, could be any. in pb code, I can get the string like '1,2,3', but how to set argument for datawindw datassource for this case?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Could you change your datawindow retrieval argument type from 'number' to 'number array', and change '=' to 'IN'?

Former Member
0 Kudos

thank you. It's working!

Answers (1)

Answers (1)

CobyKako
Advisor
Advisor
0 Kudos

See PB manuals ( Specifying an array as a retrieval argument) :

SyBooks Online