Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE @myList TABLE (Id nvarchar(max));
- INSERT INTO @myList(Id) VALUES ('40098071,40098081');
- select '''' + REPLACE(id, ',', ''',''') + '''' from @mylist
- select destid from [servername].database.[dbo].table where table in (select '''' + REPLACE(id, ',', ''',''') + '''' from @mylist)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement