Trying to add a CASE statement to a WHERE clause.
If the type = 1 then look for field values that are null.
If the type = 2 then look for field values that are not null.
This is not working and have been at it for a while...
WHERE ConvertedDate IS
CASE WHEN @ConvertedDateType = 1 THEN NULL
WHEN @ConvertedDateType = 2 THEN NOT NULL
END
This is part of a very large procedure and is the last part.
And it's too large to consider creating a string and using EXEC.
Thanks for any input.