Sunday, February 12, 2012

are there anything wrong?

update Countries set CountryName = XMLTable.CountryName,Region = XMLTable.Region, HPEntity = XMLTable.HPEntity, Model = XMLTable.Model, Incoterms = XMLTable.Incoterms, IncotermsDesc = XMLTable.IncotermsDesc, DestCountry = XMLTable.DestCountry
from
(
select CountryCode,
CountryName,
Region,
HPEntity,
Model,
Incoterms,
IncotermsDesc,
DestCountry
from OPENXML(@.xmldoc, N'/Countries/Country')
with ( CountryCode char(2) '@.id',
CountryName varchar(50) 'CountryName',
Region varchar(10) 'Region',
HPEntity varchar(2) 'HPEntity',
Model varchar(50) 'Model',
Incoterms char(3) 'IncotermOffer',
IncotermsDesc varchar(50) 'IncotermDescription',
DestCountry char(2) 'DestinationCountry/@.id')) as XMLTable
where Countries.CountryCode = XMLTable.CountryCode


Are you getting an error when you try to execute this DML? If so, what is the error?

No comments:

Post a Comment