I’ve been banging my head on this one. I’m trying to use a variable in a SQLite IN condition with no luck. If I do a straight select using this:
db eval {SELECT * FROM myTable where ord_code in (123,456,789)}</pre>
I get results back. But if I try to put the order codes in a variable, I don’t get any results back:
db eval {SELECT * FROM myTable where ord_code in ($ord_code_list)}</pre>
I’ve tried setting ord_code_list the following ways:
set ord_code_list “123,456,789”
set ord_code_list “123 456 789”
set ord_code_list “123, 456, 789”
set ord_code list {“123″,”456″,”789”}
Has anybody successfully done this, and if so, how?
Thank you!
Paul Bishop
Carle Foundation Hosptial
Urbana, IL
Paul Bishop
Carle Foundation Hospital
Urbana, IL