Hello, I'm new to this board and new to T-SQL,
I have a project at my work that is requiring me to modify an existing stored procedure to add more functionality.
How can I use a CASE or IF...ELSE (preferably a single IF) statement for this scenario?
if @report_field_v alue is equal to 0 then leave that where clause out completely else if it is a number greater than 0 then use the where clause of WHERE report_field_va lue = @report_field_v alue
Thx
Ben
I have a project at my work that is requiring me to modify an existing stored procedure to add more functionality.
How can I use a CASE or IF...ELSE (preferably a single IF) statement for this scenario?
if @report_field_v alue is equal to 0 then leave that where clause out completely else if it is a number greater than 0 then use the where clause of WHERE report_field_va lue = @report_field_v alue
Thx
Ben
Comment