Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running MDX statement in query analyzer

Status
Not open for further replies.
Sep 17, 2001
672
0
0
US
I have an mdx statement which I need to run in query analyzer but it says I have a syntax error. What must I do to an MDX statement to have it run in sql server query analyzer?

SELECT { [Time].[454].[All Time] } ON COLUMNS , { [Effort].[All Effort] } ON ROWS FROM [Offer Analysis] WHERE ( [Items].[All Items].[JEWELRY].[WOMENS JEWELRY].[WOMENS JEWELRY: BAND RINGS].[34069 - ANIMAL KINGDOM RING], [Measures].[Return Dollars], [Offer].[All Offers].[SUNDANCE CATALOG].[JEWELRY].[B2J] )
 
You can use the OPENROWSET function as so

SELECT *
FROM OPENROWSET('MSOLAP', 'Integrated Security=SSPI;Persist Security Info=False;Data Source=YourServerHere; Initial Catalog=FoodMart 2000;',
'
select
{[Measures].[Unit Sales]} on columns,
order(except([Promotion Media].[Media Type].members,{[Promotion Media].[Media Type].[No Media]}),[Measures].[Unit Sales],DESC) on rows
from Sales
') Rowset_1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top