Eduard Lebedyuk · Jul 14, 2017

How can I determine if a query is an SQL or an MDX query

I have a query text that I need to execute and return results as xml.

It may be an SQL query or an MDX query. Is there some easy way to determine which one is it?

Any ideas?

1 0 2 224
Log in or sign up to continue


In MDX, you need to include "on AXIS" where AXIS can be 0,1,2,rows,columns. I think it would be rare to find this text in an SQL query.

Is calling %DeepSee.ResultSet.%PrepareMDX() and checking the status an option? If this succeeds, you are ready to Execute and if it does not, then you can proceed with SQL.

Thank you.

I thought about using prepare, but I'm searching for solutions without it.

"ON AXIS" should work