I am trying to create an XML document as the result of queries against our database tables.
In some cases I need fields (usually INT) to display as <FieldName xsi:nil ="true" /> and that seems to work just fine if I used "ELEMENTS XSINIL"
However, I need to be able to chose (basically on a field by field basis in my SELECT statements) to return a blank field when the database holds a NULL value such as:
<FieldName></FieldName> (Or <FieldName/> either way would be fine).
How can I do that?
Thank you for your help!
FOR XML PATH('CustomRootName'), ELEMENTS XSINIL
View Complete Post