caf 13920 - Friday, February 23, 2018 7:36 AM
unitCode in your request is an XML attribute of the InvoicedQuantity element. XML attributes get expressed with a leading @ symbol in SQLXML.
Here's an example of how to add the literal value to your query.
SELECT
LineNumberID AS ID,'BUC' as "InvoicedQuantity/@unitCode",
CONVERT(decimal(18, 2), InvoicedQuantity) AS InvoicedQuantity,
FROM (SELECT LineGID FROM MyTable WHERE GUID=@NR2
FOR XML PATH('TaxScheme'), ROOT('TaxCategory'), TYPE)
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?