Wednesday, March 28, 2012

Numeric column names are pre-pended with "ID" string

Hello

I'm using SQL Server 2005 Business Intelligence Studio and have noticed an odd behavior with column names.

Specifically, if you query for a table that returns a numeric column name it is pre-pended with "ID".

For example, if my databaseReporting Services will show these fields in the "Report Datasets" as follows:

For example,

"Select identity as '1' from group_header, 1" shows a column name of "ID1" instead of "1".

Has anyone else run into this? If so, is there a way to remove the "ID".

Jay

Fields names in RDL must be CLS-compliant. I.e. they have to start with a character. If the query defines a field name so that it is not CLS-compliant, report designer will automatically generate a unique, CLS-compliant field name, such as ID1.

Note: the field name has nothing to do with the actual field values returned by the query.

-- Robert

No comments:

Post a Comment