I want to make a SELECT where I have multiple GUIDs that I use with an IN operator. Why this query does not return all rows where Table1UID equals each item from @table1IDs?
DECLARE @table1IDs NVARCHAR(100)
SET @table1IDs = 'b15f554f-90ad-4fab-b3ac-a27bc68f3b21, 72213eb7-1041-408c-9ea1-35a667285c9b'
SELECT * FROM table1
WHERE Table1UID in (@table1IDs)
It only returns the row where ID is 'b15f554f-90ad-4fab-b3ac-a27bc68f3b21'.
Mention: type of Table1UID is UNIQUEIDENTIFIER