AnuLakshmi M

AnuLakshmi M

  • NA
  • 12
  • 3.2k

How Cn insert Multiple Item Using XML

Sep 10 2014 10:41 AM
EXEC sp_xml_preparedocument @i OUTPUT, @xml_OrderPurchItems

insert into OrderPurchItems
SELECT
PurchIDNo as PurchIDNo,
@k as PurchNo,
ItemCode AS ItemCode,
ItValue as ItValue
FROM
OPENXML(@i, '/NewDataSet/Table1', 1)
WITH (
PurchIDNo VARCHAR(11) 'PurchIDNo',
PurchNo VARCHAR(20) 'PurchNo',
ItemCode VARCHAR(30) 'ItemCode' ,
ItValue VARCHAR(30) 'ItValue'

)
EXEC sp_xml_removedocument @i

This Code not working

Answers (1)