将SQL查询转换为MDX?

时间:2012-09-14 07:12:04

标签: sql ssas mdx

请帮我解决如何将下面的sql查询转换为MDX

DECLARE @a varchar(10)
DECLARE @b varchar(10)
Set @a = 'welcome'

If @a='welcome'
set @b= 'raj'+','+'venkat'



print @b

我是MDX的新手,所以请帮助我,让我更多地了解MDX。

1 个答案:

答案 0 :(得分:1)

with member [Measures].[a] as "welcome"
member [Measures].[b] as iif([Measures].[a] = "welcome", "raj"+","+ "venkat", null)

select [Measures].[b] on 0 from [mycube]