Hi All
I'm writing a SP that will search all columns in a table. The search criteria will vary a lot (sometimes an exact case-sensitive match is required, sometime I want to use a like clause and sometimes an in clause), so I want to be able to pass the where clause as a parameter. Fro example:
EXEC FindAll " like '%ABC%' "
EXEC FindAll " in ('ABC', 'DEF', 'GHI') "
EXEC FindAll "= 'ABC' "
Can soemone give me a hint of how I can escape the quotes, commas, etc.?
I'm using SQl Server 2005
Thanks
Mark