Skip to content
Advertisement

Where clause filter in stored procedure

I’m trying to create a procedure where it needs to filter the records with where condition by multiple scalar parameters. I’m facing the problem with the column I.[status].

In that column the values will be as “pending”, “rejected”, “submitted”. But when the value comes with “All”, I need to select all the status types (pending, rejected, submitted)

How to filter all the status records?

Advertisement

Answer

You can express this with boolean logic.

Just change:

To:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement