I am converting an SQL statement on an .asp to a parameter query. One of the parameters could have 1 to n values (WHERE param = 1 or param=-7 or param=6 or ...). Can I do this with a parameter query?<BR><BR>Neil
See the post above: "Stored procedures with multiple values"<BR><BR>or go to www.sqlteam.com and do a search for "dynamic sql".<BR><BR>You will basically build the sql string in your procedure and then exec() the string.
Thanks. But as I am using MS-Access, a stored procedure is actually just a query - so no ability to do the dynamic sql stuff:-(<BR>I have read through the thread you mention and conclude that using a parameter driven stored procedure (Access query) on an asp where a form select multiple tag can return an unknown number of values, is actually not possible. I will go back to simply creating the sql on the asp. I had hoped to move away from creating SQL statements on my asp, but never mind. It does seem a great shame that the Parameter data type cannot be an Array that can simply be used with the In construct:<BR><BR>SELECT Content.*<BR>FROM Content<BR>WHERE ID In [@id];<BR><BR>Thanks - Neil<BR><BR><BR><BR><BR>