sql v2000, purely for the SELECT... can I 'create' the IN list for one value based on another value?
select case when a.Server = 1 then b.Server IN ( 2, 3,4)
else when a.Server = 2 then b.Server IN (1,3,4)
else when a.Server = 3 then b.Server IN (1,2,4)
else when b.Server = 4 then b.Server in (1,2,3) end AS a.Server,
anotherfield2,anotherfield
3, anotherfield4
from table a inner join table b
on a.field = b.field
Start Free Trial