SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 MDX and OPENQUERY issue..
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

RickD
Slow But Sure Yak Herding Master

United Kingdom
3608 Posts

Posted - 07/23/2013 :  08:46:43  Show Profile  Reply with Quote
Hi,

I have an issue with OPENQUERY and MDX, specifically, when a MDX query does not return any result set due to there being no data in that slice.


SELECT * FROM OPENQUERY(OLAPLinkedServer, ' WITH Measures..blah..blah SELECT NONEMPTY(blah) FROM blah....') as mdxqry


The problem I have is I get this error message:

Msg 7357, Level 16, State 2, Line 3
Cannot process the object "WITH....

Now, I have seen suggestions to use FMTONLY OFF and NOCOUNT ON. This is great and will work with T-SQL (as long as you treat it gently), but as far as MDX goes, this simply gives a syntax error.

Now, I can take off the NONEMPTY() and I get results back, but this is not what I want to do as really don't want to see the empty sets.

Oh, and the reason I have to do the MDX this was is because we are using CF as a front end and it will not connect directly to MSOLAP, so please don't suggest it, I have already had weeks of pain with that one.

Also, the MDX is built dynamically, but this is not the issue as can take the end result and it runs fine in the MDX query window.
  Previous Topic Topic Next Topic  
 New 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.11 seconds. Powered By: Snitz Forums 2000