Is it possible to set a variable to have more than one value?
In the example below, I would like to set the @variable
and use store numbers 1,4,7 and 12
And then use the variable in the WHERE
statment.
The below is purely an example to see if this is possible or not
Declare @Variable INT;
Set @Variable = IN(1,4,7,12)
Select *
From dbo.EUactivestores eu
Where eu.[Store No] = @Variable
Any advice on if this is possible, or something similar would be great.
I believe it could help with making a more dynamic query