Hi Sean
What I'm trying to do is use some sort of variable in the where clause instead of a huge list of employee IDs (I'm open to suggestions).
One of the queries I need to update has the same set of employee IDs in twice (the where clause is split by an OR) which, as you can probably imagine) makes life a bit awkward.
The rough syntax of what I want to do is this:-
declare @variable varchar(1000)
set @variable='3661214,1604552,1604914,1604909,1602526,1602181,9667061,1600558'
select
columns here
from
table here
where
employee ID in @variable