I have xml column stored in table and xml node value for multiple id will be stored as<mid value="33,55,32">and in stored procedure.. user passes parameter string of multiple IDs as "32,55" or it may be "33"so how can i compare to filter records with above values.my query is like@parameter from SP will pass as "32,55" or "33"SELECT XmlCriteria.value(''(/Filter/MID/@value) [1]'',''varchar(500)'') MIDs FROM temp_Criteria
-------------ids mids-------------1 240, 562 44 3 120
My problem is.. as below-- EXEC tempproc @mids = '240' CREATE PROC tempproc@mids varchar(50)ASBEGIN SELECT XmlCriteria.value(''(/Filter/MID/@value) [1]'',''varchar(500)'') MIDs FROM temp_Criteria "???" WHERE XmlCriteria.value('(/SalesOrder/SalesOrderFilter/ENTITY/OEMID/@value)[1]', 'varchar(500)') IN (SELECT Data FROM dbo.fnSplitString('240,56',','))END