Hello,
I have a field in a table that is either 1 or NULL. I have a stored procedure that evaluates this condition. I also have an SSRS (2008) report that passes a parameter to this stored procedure.
If a user selects yes (passes 1) OR no (passes NULL), the following statement works correctly:
Select *
from foo
where ISNULL(c1, 0) = ISNULL(@c1,0)
However, I want the user to be able to select Yes, No, or BOTH, but I cannot figure out how to have the c1 field be either 1 or NULL to return ALL records. Any help would be greatly appreciated.