Hello,
I am trying to build a query that compares all values for a given column in "AND" operation.
DECLARE @param NVARCHAR(100
SET @param = '1,2,3,4,5'
SELECT * From Company
WHERE ID = 1 AND ID = 2 AND ID = 3...
I create a user defined Split function that returns a table after splitting the param but it only seems to work for "OR" operation:
WHERE ID IN (SELECT ID FROM Split(@param, ',').
Any suggestions would be greatly appreciated.
Thanks
SK