MDX to SQL

Sudipto Duyari 1 Reputation point
2021-04-09T12:57:04.307+00:00

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

Can any one help. if above query has any syntax error. and also can give a similar sql query

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,288 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lukas Yu -MSFT 5,821 Reputation points
    2021-04-12T06:20:47.31+00:00

    Hi,

    Looks like you only change very little in the code .

    As we said, no syntax error, but you are not selecting any results from this query because of the the Non Empty .

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

    I guess you are trying to have :

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

    Regards,
    Lukas


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.