| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL (was: Why using "Group By")
"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 Fri Mar 14 2003 - 23:41:48 CST
![]() |
![]() |