Re: SQL (was: Why using "Group By")

From: Mikito Harakiri <mikharakiri_at_yeehu.com>
Date: Sat, 15 Mar 2003 05:41:48 GMT
Message-ID: <w2zca.108280$sf5.64676_at_rwcrnsc52.ops.asp.att.net>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:7Eyca.74$ij5.7409791_at_mantis.golden.net...
> > > Do you have an example problem requiring recursion for which
transitive
> > > closure provides no solution?
> >
> > Please express 5! via transitive closure. You are not allowed to
represent
> > multiplication as sum of logariphms (you wouldn't use transitive closure
> > with that approach, anyway). My solution
> >
> > select
> > case when prior factorial is NULL then 1 else prior factorial*i end AS
> > factorial
> > from integers
> > order by i
>
> product((Integer | value between 1 and 5 ){value})
>
> I don't need any kind of recursion for that simple problem.

Where "product" is user defined summarize function? The point of the exercise was to keep procedural code to absolute minimum. OK, how about Greatest Common Divisor? (and, of course, Ackermann function is next;-) Received on Sat Mar 15 2003 - 06:41:48 CET

Original text of this message