Anthony Sims Anthony Sims - 6 months ago 3x
SQL Question

How to return all values in a table when no parameter info is selected by user

I would like to create parameters in SSRS that return all values in the table if no specific values are selected by the user. I'll make the prompt say something like: "Leave blank to view all info".


You could explicitly check for a null there. E.g., assuming the column is value and the input variable is :input:

FROM   mytable
WHERE  :input IS NULL OR :input = value