I'm trying to write the following stored procedure, but SQL has issues with the If statement. How do I include an case/if/etc into the where clause?
CREATE procedure [dbo].[MyProcedure]
@blnCheckbox bit = 1
As
Select Field1,
Field2,
Field3
From MyTable
Where Field1 like '%blah%'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.