i have task which takes a parameter and has three modes of results
Example
Parameter name is sizePram (1 = only null , 2 = only not null, 3 = both or all)
declare @sizeParam int
set @sizeParam = 1 or 2 or 3
select * from SalesLT.Product where Size =
CASE @sizeParam
when 1 then is null
when 2 then is not null
when 3 then all
end
1 Answer