You can pass the where clause as a parameter to your stored procedure, but that means you'll need to build your query as a string, and use sp_executesql to execute it.
pritaeas
Posting Prodigy
9,317 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,467
Skill Endorsements: 86