table field is bit
page its passing All - is 2,Approved -1 ,Pending -0
where condition i need to check either - 1 ,0 ,2
1-should get approved status records,
0 should get approved pending status records.
All -when i choose all - i have to get all records
Aravind GovindarajPosted Nov 21, 2022, 2:03 PM
where status in (IIF(@status = 1, 1, (IIF(@status = 0 , 0, '0,1')))