I have a report with 4 parameters. I would like to make them not required. The problem is the conventional approach to do this, creates 16 OR/AND statements. If I were to have 10 not required parameters the SOL statement would be out of control. This works but is there an easier way?
Here is what I have:
MAIN DATA SET:
select *
from table
where
table.one = @param1 OR @param1 IS NOT NULL
AND.....(etc.etc..)
@param1, @param2,@param3,@param4: (default value null/blank)
Select some_column from any_table UNION SELECT '' as Nothing
The way I’ve always done it is
So pretty much what you have, with some semantic corrections.