Click here to Skip to main content
14,539,188 members

"Column name Create Date contains an invalid XML identifier as required by FOR XML; ' '(0x0020) is the first character at fault."

Rate this:
5.00 (2 votes)
Please Sign up or sign in to vote.
5.00 (2 votes)
5 Jan 2011CPOL
To resolve the invalid chracter from FOR XML PATH clause
Background

I have a stored procedure which returns data as an XML node. This stored procedure uses temp table to populate data. The column names in the temp table contain spaces, i.e. [Create Date].

Error
"Column name Create Date contains an invalid XML identifier as required by FOR XML; ' '(0x0020) is the first character at fault."


Resolution

After removing spaces from the column names, this error was resolved.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Umair Feroze
Software Developer (Senior) Shams Software Services
Pakistan Pakistan
I have been working as a Senior Software Analyst in Shams Software Services and during this I have been working in Sql Server and C# .Net

Comments and Discussions

 
GeneralReason for my vote of 5 I searched alot for this error and t... Pin
FSUMSoft11-Jan-11 22:41
MemberFSUMSoft11-Jan-11 22:41 
GeneralReason for my vote of 5 It resolved my problem and saved my ... Pin
Abdul_Hafeez6-Jan-11 0:25
MemberAbdul_Hafeez6-Jan-11 0:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Tip/Trick
Posted 5 Jan 2011

Tagged as

Stats

25K views
2 bookmarked