>>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