I have a parameter @Quotes which will prompt the user for Yes or No. If @Quotes='Yes' then I need the where statement to only include field OrderType='QUotes' but if @Quotes='No' then it is to include OrderType='Quotes' and OrderType='Orders'
How do you incorporate an If or case syntax within the where statement of a stored procedure, without having to pass the IF first (so there's 2 queries on the data)?
How do you incorporate an If or case syntax within the where statement of a stored procedure, without having to pass the IF first (so there's 2 queries on the data)?