I would pass a table type parameter (since its 2008it's SQL Server 2008), and do a where existswhere exists, or inner join. You may also use XML, using sp_xml_preparedocumentsp_xml_preparedocument, and then even index that temptemporary table.
Peter Mortensen
- 31.2k
- 22
- 110
- 134