question

SudiptoDuyari-5179 avatar image
0 Votes"
SudiptoDuyari-5179 asked LukasYu-msft answered

MDX to SQL and check Syntax error

SELECT
{}
ON 0,
NON EMPTY (
[Entity].[EntityPRID].&[118445008]*
[Entity-OrgType].[EntityOrgType].[EntityOrgType].MEMBERS
)
ON 1
FROM [Model]


Can anyone please help with the above query, I want to know if there is any syntax error, and what will be SQL query for the above?

sql-server-transact-sqlsql-server-analysis-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LukasYu-msft avatar image
0 Votes"
LukasYu-msft answered LukasYu-msft edited

Hi,

There is no syntax error in the query. But you are not selecting any results from this query because of the the Non Empty function.

I guess you are trying to find :

 SELECT
 {}
 ON 0,
  (
 [Entity].[EntityPRID].&[118445008]*
 [Entity-OrgType].[EntityOrgType].[EntityOrgType].MEMBERS
 )
 ON 1
 FROM [Model]


and SQL query cannot run in multidimensional cube. It is not very meaningful to find the "same" sql query.

But similar SQL against the original data source would be something like :

 SELECT '118445008' as EntityPRID, EntityOrgType from Entity-OrgType

Regards,
Lukas


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LukasYu-msft avatar image
0 Votes"
LukasYu-msft answered

Hi,
We did not hear from you back, was you problem solved?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.