I tried searching around but couldn't find anything that would help me out.
I'm trying to do this in SQL:
DECLARE @onlyMM INT
SET @onlyMM = 1
SELECT *
FROM cdn.magnag
WHERE CASE @onlyMM
WHEN 1
THEN man_zrdtyp NOT IN (
1616
,2001
)
ELSE - 1
END
I have a problem with:
where case @onlyMM when 1 then man_zrdtyp not in (1616,2001) else -1 end
how to properly make a case
for the operator not in
?