SET @ProductMapping='
Table1>
ProductId>1
InclusionDescription>0
SubCatID>0
CreditLimit>0
Quantity>10
CreatedBy>15
/Table1>
Table1>
ProductId>2
InclusionDescription>0
SubCatID>0
CreditLimit>0
Quantity>10
CreatedBy>15
/Table1>
Table1>
ProductId>3
InclusionDescription>0
SubCatID>0
CreditLimit>0
Quantity>10
CreatedBy>15
/Table1>
Table1>
ProductId>0
InclusionDescription>0
SubCatID>1
CreditLimit>10
Quantity>0
CreatedBy>15
/Table1>
Table1>
ProductId>0
InclusionDescription>0
SubCatID>2
CreditLimit>10
Quantity>0
CreatedBy>15
/Table1>
Table1>
ProductId>0
InclusionDescription>xxx
SubCatID>0
CreditLimit>0
Quantity>123
CreatedBy>15
/Table1>
Table1>
ProductId>0
InclusionDescription>yyy
SubCatID>0
CreditLimit>0
Quantity>10
CreatedBy>15
/Table1>
/DocumentElement>'
SELECT
PackageInclus.COL.value('ProductId[1]','INT') AS ProductId,
PackageInclus.COL.value('InclusionDescription[1]','NVARCHAR(500)') AS InclusionDescription,
PackageInclus.COL.value('SubCatID[1]','INT') AS SubCatID,
PackageInclus.COL.value('CreditLimit[1]','MONEY') AS CreditLimit,
PackageInclus.COL.value('Quantity[1]','INT') AS Quantity,
PackageInclus.COL.value('CreatedBy[1]','INT') AS CreatedBy
FROM @ProductMapping.nodes(N'//DocumentElement/Table1') AS PackageInclus(COL);