Referencing MDX Query results in SQL Server -
08-31-2005
, 07:06 PM
I’ve utilized Openrowset with Select…Into to dump the results of a
MDX query into a new table created on the fly. I’ve attempted t
reference the results using the INFORMATION_SCHEMA.COLUMNS table t
build a dynamic T-SQL statement, T-SQL doesn’t recognize the colum
names that are automatically assigned to these columns because the
contain “.” The first four column names ar
[Date].[Year].[MEMBER_CAPTION],[Date].[Quarter].[MEMBER_CAPTION],[Date].[Month].[MEMBER_CAPTION],[Date].[Day].[MEMBER_CAPTION
When selecting the first of these, I get this error message
The column prefix 'Date.Year' does not match with a table name o
alias name used in the query
If I enclose the column name in brackets, selectin
[[Date].[Year].[MEMBER_CAPTION]
I get this error
Unclosed quotation mark before the character string 'MEMBER_CAPTION
I could also select these columns by ordinal position, but I do no
believe that is possible in T-SQL
Any other suggestions |