dbTalk Databases Forums  

Date range in Where clause

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


Discuss Date range in Where clause in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
necati@cbksoft
 
Posts: n/a

Default Date range in Where clause - 04-06-2006 , 06:35 AM






By Deepak Puri,
it is declared that a MDX query like
....
WHERE {[NonSelectedDate].[2005].[Jan].[01]:
[NonSelectedDate].[2005].[Mar].[26]}

does not give syntax error

However, when i tried in AS2000 i got an error message like "Can not convert
set to tuple"

Can i use such syntax in AS2000 also? Otherwise, how can i look for a date
interval in my where condition?

Thanks



--
Necati Sekkeli
CBKSoft
Junior Software Developer

Reply With Quote
  #2  
Old   
necati@cbksoft
 
Posts: n/a

Default RE: Date range in Where clause - 04-06-2006 , 09:24 AM






Ok then. I got the point with myself and want to share it in case some other
developers may need.

WITH MEMBER [Time].[Total] AS 'Sum({[Time].[2005].[1]: [Time].[2006].[6]})'

SELECT {....} ON COLUMNS, NON EMPTY {....} ON ROWS FROM My_Cube
where ( [Time].[Total])

Necati Sekkeli
CBKSoft
Junior Software Developer


"necati@cbksoft" wrote:

Quote:
By Deepak Puri,
it is declared that a MDX query like
...
WHERE {[NonSelectedDate].[2005].[Jan].[01]:
[NonSelectedDate].[2005].[Mar].[26]}

does not give syntax error

However, when i tried in AS2000 i got an error message like "Can not convert
set to tuple"

Can i use such syntax in AS2000 also? Otherwise, how can i look for a date
interval in my where condition?

Thanks



--
Necati Sekkeli
CBKSoft
Junior Software Developer

Reply With Quote
  #3  
Old   
Deepak Puri
 
Posts: n/a

Default RE: Date range in Where clause - 04-06-2006 , 12:20 PM



Hi Necati,

Please note that a set in the MDX Where clause works only in AS 2005,
not in AS 2000.


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** 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.