Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select into XML
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01538838
Message ID:
01538839
Vues:
24
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform