There is a variable with 3 possible values 'ISSUED', 'PENDING', 'BOTH'
the table in the background is having bit datatype for this filed so it assumes ISSUED as 1 and PENDING as 0 through the CASE statement.
Now I want if the variable Value is 'ALL' then it consider ISSUED as well as PENDING.
Can somebody suggest anything?
DECLARE @status Varchar (10)
--following is the part of select statement I have written
CASE @status WHEN 'ISSUED' THEN 1
WHEN 'PENDING' THEN 0
WHEN 'ALL' THEN --I need help here as I want the rows matching either 1 or 0
-Forum Etiquette: How to post Performance Problems[/url]
-Forum Etiquette: How to post data/code to get the best help [/url]