dbTalk Databases Forums  

Problem with Recursing too Many levels

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


Discuss Problem with Recursing too Many levels in the microsoft.public.sqlserver.olap forum.



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

Default Problem with Recursing too Many levels - 09-21-2005 , 12:47 AM






Hi,
I have the classic "Inventory Problem" and have tried the various
recursive approaches to find the last balance.

I keep getting "internal errors". I have also seen a recent post by
Mosha, that identifies a problem with SP2 whereby if something
recurses more than 30 times, an internal error occurs.

Two questions:

1) Is recursion the best way to handle this if i have to recurse
possible hundreds of times?
2) If not how else can I do this - efficiently?

I could force a balance say every six months and avoid the 30 limit but
I'd rather not.

Many thanks


Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Problem with Recursing too Many levels - 09-21-2005 , 04:03 AM






No real magic here. Getting a generic solution is hard.
This is why AS2K5 does it natively. There is a new aggregation function
called "LastNonEmptyChild" which does exactly what you are looking for.
Unfortunately it isn't available in AS2K -- it is a new AS2K5 feature.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI Systems Team
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Peter" <peterr (AT) intellimaxsolutions (DOT) com> wrote

Quote:
Hi,
I have the classic "Inventory Problem" and have tried the various
recursive approaches to find the last balance.

I keep getting "internal errors". I have also seen a recent post by
Mosha, that identifies a problem with SP2 whereby if something
recurses more than 30 times, an internal error occurs.

Two questions:

1) Is recursion the best way to handle this if i have to recurse
possible hundreds of times?
2) If not how else can I do this - efficiently?

I could force a balance say every six months and avoid the 30 limit but
I'd rather not.

Many thanks




Reply With Quote
  #3  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Problem with Recursing too Many levels - 09-21-2005 , 05:55 AM



Mosha's article also said that this issue was fixed in SP3 and above.
Would this not be an incentive to upgrade to the latest SP?

--
Regards
Darren Gosbell [MCSD]
<dgosbell_at_yahoo_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

In article <1127281667.726217.255130 (AT) z14g2000cwz (DOT) googlegroups.com>,
peterr (AT) intellimaxsolutions (DOT) com says...
Quote:
Hi,
I have the classic "Inventory Problem" and have tried the various
recursive approaches to find the last balance.

I keep getting "internal errors". I have also seen a recent post by
Mosha, that identifies a problem with SP2 whereby if something
recurses more than 30 times, an internal error occurs.

Two questions:

1) Is recursion the best way to handle this if i have to recurse
possible hundreds of times?
2) If not how else can I do this - efficiently?

I could force a balance say every six months and avoid the 30 limit but
I'd rather not.

Many thanks



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.