Skip to content
Advertisement

SQL Where clause conditional assignment based on another parameter

I need to generate a report where the user can choose All Issues, Open Issues, or Closed issues in a radio button. In my view I have a isClosed bit column. If I didn’t have the All Issues radio box I’d just do:

However I need to remove the isClosed = @ViewClosedRecords condition when the @ViewAllRecords = true. How would I do this?

Advertisement

Answer

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