In case anyone is interested, below is a solution that is working as desired. I had to do a little messing around with the namespace reference at the very end because SQL requires the namespace while building the XML, but was adding it to more elements than just the root.
DECLARE
@xmlDoc...
I'm experimenting with creating PIDX XML data straight from SQL (Microsoft SQL Server 2005 - 9.00.5057.00). I'm just getting started but ran into a roadblock when trying to add an attribute to the root element. This is what I've got so far:
DECLARE
@xmlDoc VARCHAR(MAX)
,@declaration...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.