Anthony Sims Anthony Sims - 2 years ago 69
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".

Answer Source

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download