Thank you visakh16!But when i run the query i get an error message;Incorrect syntax near the keyword Where.So i change this line in: Where (LastAssignedWorkgroupID IN (N'Test1, N'Test2'))tBut that does not help.Any idea's?