How Cn insert Multiple Item Using XML
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