Simple table:
create table Items
(
Price money null
)
Now I need to create a stored procedure that accepts one paramter of type bit @ItemsWithPriceTenDollarsOrMore
which:
- returns all items if parameter is null
- returns all items with Price >=10 if parameter = 1
- returns all items with Price < 10 if parameter = 0
I have difficulty expressing this filter in a single where statement (not using dynamic sql or conditional logic).