I need to do a conditional statement in my where clause similar to
WHERE
IF(@Param = 0) THEN
Column1 != 7
I am attempting to allow the user to exclude a set of records based on the value of the @Param.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try
If often do things like…
There’s a good article about where clauses here…
http://weblogs.sqlteam.com/jeffs/archive/2003/11/14/513.aspx