sql server - MDX+TSQL column name doesn't exist -


i have create mixture of mdx , tsql follows:

    select "[state].[country].[country].[member_caption]" state,     "[measures].[somemeasure]" [sum]     openquery(my_olap_server,     'select [measures].[somemeasure] on 0,     filter([state].[country].[country],not isempty([measures].[somemeasure])) on 1     (select {[state].[country].[country].&[index_here]} on columns [my cube])') 

if mdx returns no value, [state].[country].[country].[member_caption] not exists, query fails message

msg 207, level 16, state 1, line 2 invalid column name '[state].[country].[country].[member_caption]' 

.

is there way force either mdx or tsql (but i'm guessing mdx) provide this? thanks

    select "[measures].[statename]" state,     "[measures].[somemeasure]" [sum]     openquery(my_olap_server,     'with member [measures].[statename]     [state].[country].currentmember.member_caption     select {[measures].[statename],[measures].[somemeasure]} on 0,     filter([state].[country].[country],not isempty([measures].[somemeasure])) on 1     (select {[state].[country].[country].&[index_here]} on columns [my cube])') 

is solution. simple enough :)


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -