Webskater
08-21-2003, 09:38 AM
This is really a SQL question but I cannot see a SQL forum - and I guess if you're using ASP you are probably using a SQL database of some sort.
Anyway ... I need to create a dynamic Where clause within a Stored Procedure.
I might want to say ... WHERE ProductID = 3
or WHERE ProductID = 3 or ProductID=7 or ProductID = 9
etc.
The amount of parameters in the Where clause will vary. I can concatenate the clause until I am blue in the face but it will not execute. Any ideas how to do this.
Thanks.
Anyway ... I need to create a dynamic Where clause within a Stored Procedure.
I might want to say ... WHERE ProductID = 3
or WHERE ProductID = 3 or ProductID=7 or ProductID = 9
etc.
The amount of parameters in the Where clause will vary. I can concatenate the clause until I am blue in the face but it will not execute. Any ideas how to do this.
Thanks.