dbTalk Databases Forums  

Creating optimized time sets

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


Discuss Creating optimized time sets in the microsoft.public.sqlserver.olap forum.



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

Default Creating optimized time sets - 05-04-2005 , 09:08 PM






Does anyone have a procedure which can accept start and stop dates and
return a optimized time set to query from time dimension
The time set needs to be used inside aggregate function in MDX

for ex
1.exec proc_CreateMDXTimeSet '2004/01/01', '2004/01/31', @qry1 OUTPUT
@qry1 should give [time].[2004].[Quarter 1].[January]

2.exec proc_CreateMDXTimeSet '2004/01/01', '2004/02/10', @qry1 OUTPUT
This should return
[time].[2004].[Quarter 1].[January], [time].[2004].[Quarter
1].[February].[Week 5].[20040201], [time].[2004].[Quarter 1].[February].[Week
6], [time].[2004].[Quarter 1].[February].[Week 7].[20040209],
[time].[2004].[Quarter 1].[February].[Week 7].[20040210]

Thanks


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

Default Re: Creating optimized time sets - 05-05-2005 , 10:31 AM






Does this need to be a SQL Server proc - some MDX algorithms were
discussed in Chris Webb's blog?

http://spaces.msn.com/members/cwebbbi/Blog/cns!1pi7ETChsJ1un_2s41jm9Iyg!
107.entry

http://spaces.msn.com/members/cwebbbi/Blog/cns!1pi7ETChsJ1un_2s41jm9Iyg!
111.entry


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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

Reply With Quote
  #3  
Old   
Sanjay
 
Posts: n/a

Default Re: Creating optimized time sets - 05-05-2005 , 06:47 PM



I need to SQl Server proc
Problem is we call MDX using OpenQuery in a stored proc and we need a stored
proc like this using which we can prepare the MDX inside SQL procedure

Thanks


"Deepak Puri" wrote:

Quote:
Does this need to be a SQL Server proc - some MDX algorithms were
discussed in Chris Webb's blog?

http://spaces.msn.com/members/cwebbbi/Blog/cns!1pi7ETChsJ1un_2s41jm9Iyg!
107.entry

http://spaces.msn.com/members/cwebbbi/Blog/cns!1pi7ETChsJ1un_2s41jm9Iyg!
111.entry


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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


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

Default Re: Creating optimized time sets - 05-05-2005 , 09:41 PM



Can you call the MDX necessary to generate the set using something like
OpenRowset() as well, so that results are returned to SQL Server? Then
you can build an MDX query dynamically from the results returned.


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

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

Reply With Quote
  #5  
Old   
Sanjay
 
Posts: n/a

Default Re: Creating optimized time sets - 05-06-2005 , 12:42 PM



Yes i guess i could use OpenRowset

But i still need the proc which does calculate the time set for me as i
posted in my orignal note

for ex
1.exec proc_CreateMDXTimeSet '2004/01/01', '2004/01/31', @qry1 OUTPUT
@qry1 should give [time].[2004].[Quarter 1].[January]

2.exec proc_CreateMDXTimeSet '2004/01/01', '2004/02/10', @qry1 OUTPUT
This should return
[time].[2004].[Quarter 1].[January], [time].[2004].[Quarter
1].[February].[Week 5].[20040201], [time].[2004].[Quarter 1].[February].[Week
6], [time].[2004].[Quarter 1].[February].[Week 7].[20040209],
[time].[2004].[Quarter 1].[February].[Week 7].[20040210]


Thanks

"Deepak Puri" wrote:

Quote:
Can you call the MDX necessary to generate the set using something like
OpenRowset() as well, so that results are returned to SQL Server? Then
you can build an MDX query dynamically from the results returned.


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