M
Mary1982
Guest
Hello,
I need your help to store every row for a table as xml at once and partition by invoice head id.
I have two tables invoiceHeader and invoiceDetails, but xml elements is different for every invoice type, it's not the same for every invoice.
For example:
SELECT
lineNumber, quantity, measurementUnit, invoiceDetailType, netValue, vatCategory, vatAmount, vatExemptionCategory
FROM invoiceDetails
FOR XML RAW ('invoiceDetails'), ELEMENTS;
I need to know if there is a more efficient way except to select every invoice as XML PATH and insert then query result in a column (datatype as XML). Perhaps if i can do that in once for all rows.
Thanks you.
Continue reading...
I need your help to store every row for a table as xml at once and partition by invoice head id.
I have two tables invoiceHeader and invoiceDetails, but xml elements is different for every invoice type, it's not the same for every invoice.
For example:
SELECT
lineNumber, quantity, measurementUnit, invoiceDetailType, netValue, vatCategory, vatAmount, vatExemptionCategory
FROM invoiceDetails
FOR XML RAW ('invoiceDetails'), ELEMENTS;
I need to know if there is a more efficient way except to select every invoice as XML PATH and insert then query result in a column (datatype as XML). Perhaps if i can do that in once for all rows.
Thanks you.
Continue reading...