How to use a variable as a list
Posted: Thu Dec 22, 2022 12:09 pm
Hi,
I need to define a variable as a list of integers (eg: 2,4,7,11,15), so I can write a sql query with filter if a data field is within that list, as follows:
Select * from table1
where
field1 in variablelist
(I do not mean this the exact query, but just to give you the idea that I want to validate that the value of field1 is within those values of the list defined for the variable).
How can I do that?
Thanks,
Jose Luis
I need to define a variable as a list of integers (eg: 2,4,7,11,15), so I can write a sql query with filter if a data field is within that list, as follows:
Select * from table1
where
field1 in variablelist
(I do not mean this the exact query, but just to give you the idea that I want to validate that the value of field1 is within those values of the list defined for the variable).
How can I do that?
Thanks,
Jose Luis