I have the following query:
select * from cars where make in (\'BMW\', \'Toyota\', \'Nissan\')
What I want to do is store the where param
You can use a table variable:
declare @caroptions table ( car varchar(1000) ) insert into @caroptions values ('BMW') insert into @caroptions values ('Toyota') insert into @caroptions values ('Nissan') select * from cars where make in (select car from @caroptions)