I have a stored procedure created that I need to return model sets for a client. I have about 10 model sets that need to be under the @Report parameter i have. The basic function of the stored procedure pulls multiple columns from the database then joins a view that flattens out a self referencing table. The view is where I need to pull my model sets from. Is there anyone that can help me define my @Report parameter to show the model sets.
ex.
IF @Report = 'Model Set A' then view.code in ['4750','4760']
IF @Report = 'Model Set B' then view.code in ['4870']
I set the @Report as varchar and then declared @model_set varchar as well. I was using a select case in the where clause but when i execute my procedure i still get all the model numbers.