Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Dynamic WHERE clause alternative.

Author  Topic 

Access
Starting Member

44 Posts

Posted - 2007-06-26 : 23:14:19
I have 3 tables: Authors, Employee and Stores.
I need to create a stored procedure which will take 3 comma delimited parameters, to be able to query above 3 tables.
Basically my front end user can say give me Authors with last name starting from ‘A,B’ and Employee with first name starting from ‘J,N,K’ and Stores with city starting from ‘New, Los’.
So, stored procedure call will look like this Exec myStoredProcedure 'A,B' , 'J,N,K', 'New,Los' .

My question is, how should I handle WHERE clause in stored procedure if I don’t want it to be a “dynamic WHERE”.

Thank you

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-06-26 : 23:26:31
Dup post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85610
Go to Top of Page
   

- Advertisement -