65.9K
CodeProject is changing. Read more.
Home

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

starIconstarIconstarIconstarIconstarIcon

5.00/5 (2 votes)

Jan 5, 2011

CPOL
viewsIcon

30972

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.