Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select into XML
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01538838
Message ID:
01538847
Views:
26
>>Try also
>>
>>
>>SELECT USER_NAME , USER_EMAIL, USER_CC , 
>>USER_PHONE , USER_BLDG , USER_FLOOR 
>>USER_ROOM 
>> FROM USERINFO WHERE COOKIE_ID = @CookieId FOR XML PATH ('User') , ROOT("Users")
>
>Adding ROOT() as suggested turned out to be the solution. I just needed to use a different root name. Thank you very much.

You're welcome. I participated in the http://blog.sqlauthority.com/2011/08/01/sql-server-win-a-book-a-day-contest-rules-day-0-of-35/ and I won (by random selection) 4 books out of 5 which were the prizes. One of them is called 'A Guide to Integrating SQL Server with XML, C#, and PowerShell' (the 5th book) and it's helpful in understanding XML.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform