Reputation: 754
I'm trying to create a report where the user can select either parameter option and it will filter by chosen parameter, or filter by both.
Currently I'm using an OR statement like so:
SELECT a,b
FROM table a
WHERE (a = @A) OR (b=@b)
The issue is when I try and enter a value for both it only filters by one. How do I change it so it will filter each one out but at the same time keep the ability to filter by only one?
Upvotes: 0
Views: 109