Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

dynamic where clause in sql server stored procedure

WHERE 1 = 1
AND (@what     IS NULL OR [companies_SimpleList].[Description] Like @What )
AND (@keywords IS NULL OR companies_SimpleList.Keywords        Like @Keywords)
AND (@where    IS NULL OR companies_SimpleList.FullAdress      Like @Where)
...
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamic #clause #sql #server #stored #procedure
ADD COMMENT
Topic
Name
2+1 =