>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.
USER_NAME is a function in SQL Server. Now, do you have a field making each row unique? If not, XML PATH is getting confused.
If it's not broken, fix it until it is.
My Blog