StringList as a parameter for execsql

I am using execsql to query and would like to input contents of a stringlist for the “IN” clause as parameter.

select * from customers where zipcode IN (‘55555’,‘22222’…)

the data for zipcode is retrieved from a seperate database into a stringlist.

Looking for some suggestions on how this can be done.

thx

Hi,

First convert a stringlist to comma separted string built-in service will help you to do that or loop the stringlist and generate a string and then concat this to the existing query string.