Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select into XML
Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
SQL Select into XML
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01538838
Message ID:
01538838
Views:
67
Hi,

Can you see what is wrong with the following SQL Select that outputs into XML? The error I get (in the calling routine) that the XML has multiple root element. Another thing is that in the SQL Server query window the first name (USER_NAME) is shown in a different color (looks like purple).
SELECT USER_NAME "USER_NAME", USER_EMAIL "USER_EMAIL", USER_CC "USER_CC", 
USER_PHONE "USER_PHONE", USER_BLDG "USER_BLDG", USER_FLOOR "USER_FLOOR",
USER_ROOM "USER_ROOM" FROM USERINFO WHERE COOKIE_ID = @CookieId FOR XML PATH ('') 
TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform