Thread

Skip Navigation LinksForums > SpiraTeam Forums > SpiraTeam Issues & Questi... > FYI: workaround for repor...

FYI: workaround for report sql and the error "System.Xml.XmlException: The '#' character, hexadecimal value 0x23, cannot be included in a name." RSS Feed

Monday, August 25, 2014
FYI:  If you are writing report SQLand run into the following error:  "System.Xml.XmlException: The '#' character, hexadecimal value 0x23, cannot be included in a name."

...then make sure you aren't selecting two columns from two separate tables with the exact same name.  Use aliasing to prevent the problem.

For example, the following SQL will cause a problem:

SELECT rel.NAME, req.NAME FROM SpiraTestEntities.R_Releases AS rel LEFT JOIN SpiraTestEntities.R_Requirements AS req on rel.RELEASE_ID = req.RELEASE_ID WHERE rel.PROJECT_ID = ${ProjectId}

The following SQL is equivalent except the column name aliases will preclude the aforementioned error:

SELECT rel.NAME AS rel_Name, req.NAME AS req_NAME FROM SpiraTestEntities.R_Releases AS rel LEFT JOIN SpiraTestEntities.R_Requirements AS req on rel.RELEASE_ID = req.RELEASE_ID WHERE rel.PROJECT_ID = ${ProjectId}

1 Replies
Elise B.Elise B.
re: Jon Freed on Monday, August 25, 2014
Thursday, August 28, 2014
Thanks for the information, Jon!
Statistics
  • Started: 8/25/2014
  • Last Reply: 8/28/2014
  • Replies: 1
  • Views: 1069
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.