开发者

Get Empty Column Back

开发者 https://www.devze.com 2022-12-12 01:17 出处:网络
In TSQL I can do Select Column1, Column2, \'\' as Column3, 0 as Column4 From MyTable I am trying my MDX as:

In TSQL I can do

Select Column1, Column2, '' as Column3, 0 as Column4
From MyTable

I am trying my MDX as:

SELECT
{Measures.Measure1} ON COLUMNS
{
    Dimension1.DimensionColumn1.DimensionColumn1.Members,
    '',
    0
} ON ROWS
FROM  [CubeName]

This does not work - I get the following error message

Executing the query ...
Query (12, 1) Parser: The syntax for '{' is incor开发者_运维问答rect.

Question: How do I return empty or Zero ON ROWS in MDX?


You need to define the constant as an expression:

WITH
MEMBER MEASURES.CONSTANTVALUE AS 1
SELECT {MEASURES.CONSTANTVALUE} ON COLUMNS
FROM [cube]
0

精彩评论

暂无评论...
验证码 换一张
取 消