1
Answer

How Cn insert Multiple Item Using XML

AnuLakshmi M

AnuLakshmi M

10y
643
1
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)