We just had to solve this very problem this week in asp.net c#. [with the ack that there are multiple ways to solve most problems]
The way we solved it is to understand that what the db needs is this: IN (:parameter1, :parameter2, :paramater3, [..]) So you take your input string, split it, put it in a list/array, create some dynamic variable names "fieldname + counter". Do a for each word in list type loop: fieldname + counter = "'" + word + "'" //put the single quotes around your string sql_string = sql_string + ":" + fieldname1 Then build the actual sql statement as seen above. Your single quotes need to be in the parameter. You'll need to do slightly different processing for numbers in that they will not need the single quotes around them. Sorry, thinking in C# at the moment, If you need to see how to do dynamic variable names in flex, look here: http://www.nabble.com/RE%3A-Dynamically-Naming-Objects-p24017449.html HTH brad On Fri, Jun 19, 2009 at 3:37 PM, Jim Hayes <[email protected]> wrote: > > > I'm looking for a way to use the "IN" sql syntax and parameters, > something like "SELECT someField FROM someTable WHERE someOtherField IN > (1,4,6,8,12);" . > Obviously I could build a string query from an array and execute that, but > I'd rather stay with parameters if at all possible. > > If anyone knows, please do tell! > I'm afraid I'm away from my workstation so can't check it at the moment. > Many thanks! > > __________________________________________________________ > This communication is from Primal Pictures Ltd., a company registered in > England and Wales with registration No. 02622298 and registered office: 4th > Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. > VAT registration No. 648874577. > > This e-mail is confidential and may be privileged. It may be read, copied > and used only by the intended recipient. If you have received it in error, > please contact the sender immediately by return e-mail or by telephoning > +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its > contents to any person. > This email has been scanned for Primal Pictures by the MessageLabs Email > Security System. > __________________________________________________________ > >

