Open Xml Document in Store Procedure for bulk delete?

Sabarimahesh
Posted by Sabarimahesh under Sql Server category on | Points: 40 | Views : 1044
CREATE PROCEDURE [dbo].[Sp_DeleteXml] 

@strXML varchar(100)

AS

DECLARE @index int

EXEC sp_xml_preparedocument @index OUTPUT,
@strXML



BEGIN


DELETE from T1SP1 WHERE ID in
(Select id from OPENXML(@index, '/data/ids')
WITH (id INT) Xmlid)




EXEC sp_xml_removedocument @index

End

Comments or Responses

Login to post response