Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Referencing MDX Query results in SQL Server
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

4 Posts

Posted - 08/31/2005 :  21:00:32  Show Profile  Reply with Quote
I’ve utilized Openrowset with Select…Into to dump the results of an MDX queries into a new table created on the fly. I’ve attempted to reference the results using the INFORMATION_SCHEMA.COLUMNS table to build a dynamic T-SQL screen, T-SQL doesn’t recognize the column names that are automatically assigned to these columns because they contain “.” The first four column names are [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 or alias name used in the query.

If I enclose the column name in brackets, selecting [[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 not believe that is possible in T-SQL.

Any other suggestions?
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000