by the way, that's not a functional example...i was using array syntax, but
this won't work if you try to use it as is...it should be a 'list' or else
contain an even number of elements...not that it's relevant, but i hate
posting code that's inoperable...
-----Original Message-----
From: Gonzalez, Kristopher
Sent: Thursday, April 12, 2001 1:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Select
depends upon the language you're interfacing with...
for instance, in tcl (my lang of choice), your select would look
like the following:
array set myarray {1 2 3 4 5}
set sql "SELECT * FROM tablename WHERE id IN ([join [array get
$myarray] ,]);
the thing that you have to do is make sure your array elements are
seperated by a comma (notice the join syntax...again, you'll have to tailor
this to whatver lang you're using)
-----Original Message-----
From: Jim Zarvis [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 1:02 PM
To: Gonzalez, Kristopher
Subject: RE: Select
-----Original Message-----
From: Gonzalez, Kristopher
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 12, 2001 1:56 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Select
select * from tablename where id in (1, 3, 4)
does this mean that I can do this:
select * from tablename where id in
($myarray)
?
The array is dynamically generated, and I
won't know it's values until run time...