dbTalk Databases Forums  

clauses where in MDX queries

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss clauses where in MDX queries in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TRYP
 
Posts: n/a

Default clauses where in MDX queries - 07-08-2005 , 07:42 AM






Hi,
Please help me.
I want to put 2 conditions in my where clause but it doesn't work

SELECT NON EMPTY
{ [Measures].[NbRapports]} ON COLUMNS,
{ [rapport].CHILDREN} ON ROWS,
{ descendants([date].[Tous les date],[date].[Jour],LEAVES) } ON PAGES
FROM cube_RS
WHERE ([Serveur].[Tous les Serveur].[1234])AND [date].[Année ].[2005]

Thanks in advance,
Oliver

Reply With Quote
  #2  
Old   
mike
 
Posts: n/a

Default RE: clauses where in MDX queries - 07-08-2005 , 08:55 AM






You can't have the where clause contain a dimension that you are also
selecting. try this ( i haven't validated that this works ):

SELECT NON EMPTY
{ [Measures].[NbRapports]} ON COLUMNS,
{ [rapport].CHILDREN} ON ROWS,
{ descendants([date].[Année ].[2005],[date].[Jour]) } ON PAGES
FROM cube_RS
WHERE ([Serveur].[Tous les Serveur].[1234])



"TRYP" wrote:

Quote:
Hi,
Please help me.
I want to put 2 conditions in my where clause but it doesn't work

SELECT NON EMPTY
{ [Measures].[NbRapports]} ON COLUMNS,
{ [rapport].CHILDREN} ON ROWS,
{ descendants([date].[Tous les date],[date].[Jour],LEAVES) } ON PAGES
FROM cube_RS
WHERE ([Serveur].[Tous les Serveur].[1234])AND [date].[Année ].[2005]

Thanks in advance,
Oliver


Reply With Quote
  #3  
Old   
Oliver Stones
 
Posts: n/a

Default RE: clauses where in MDX queries - 07-11-2005 , 02:55 AM



Thanks for the answer it works very good....

I have an other problem now

SELECT NON EMPTY
{ [Measures].[NbRapports]} ON COLUMNS,
{ [rapport].CHILDREN} ON ROWS,
{ descendants([date].[Tous les date],[date].[Jour],LEAVES) } ON PAGES
FROM cube_RS
WHERE ([Serveur].[Tous les Serveur].[1234])AND [User].[Oliver]

Thanks in advance


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.