Sql server case statement in where clause
select * from table1 t1 where t1.active=1 and case when @x=1 then t1.name="" else t1.name<>"". please help to write it correct syntax
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sachin SinghPosted Nov 27, 2020, 10:31 AM
P KPosted Nov 27, 2020, 10:34 AM
P KPosted Nov 27, 2020, 10:25 AM
P KPosted Nov 27, 2020, 9:56 AM
Sachin SinghPosted Nov 27, 2020, 9:44 AM
P KPosted Nov 27, 2020, 9:33 AM
Mageshwaran RPosted Nov 27, 2020, 9:31 AM