dbTalk Databases Forums  

Referencing MDX Query results in SQL Server

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Referencing MDX Query results in SQL Server in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
rip.murdock
 
Posts: n/a

Default 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.