CREATE PROCEDURE usp_CustomersSelect @customerIDs text AS DECLARE @hDoc int EXECUTE sp_xml_preparedocument @hDoc OUTPUT, @customerIDs SELECT * FROM customers c INNER JOIN OPENXML(@hDoc, 'customers/id') WITH (id int "@value") x ON c.customerid = x.id EXECUTE sp_xml_removedocument @hDocThe XML fragment should have the following form:
<customers> <id value="nnn"/> </customers>-Mike