Re: [GENERAL] Subselects - recursion problem

2005-05-30 Thread Philip Rhoades
Martijn, On Mon, 2005-05-30 at 21:08, Martijn van Oosterhout wrote: > On Mon, May 30, 2005 at 08:32:15PM +1000, Philip Rhoades wrote: > > Martijn, > > > > > > On Mon, 2005-05-30 at 19:50, Martijn van Oosterhout wrote: > > > "recursion problem" ? It's called a correlated subquery. SQL is > > > d

Re: [GENERAL] Subselects - recursion problem

2005-05-30 Thread Martijn van Oosterhout
On Mon, May 30, 2005 at 08:32:15PM +1000, Philip Rhoades wrote: > Martijn, > > > On Mon, 2005-05-30 at 19:50, Martijn van Oosterhout wrote: > > "recursion problem" ? It's called a correlated subquery. SQL is > > declarative, you state what you want and the database figures out how > > to get the

Re: [GENERAL] Subselects - recursion problem

2005-05-30 Thread Philip Rhoades
Martijn, On Mon, 2005-05-30 at 19:50, Martijn van Oosterhout wrote: > On Mon, May 30, 2005 at 07:33:04PM +1000, Philip Rhoades wrote: > > People, > > > > The following script works (I have confirmed it by doing two separate > > views and doing a select on them) - but I don't understand why there

Re: [GENERAL] Subselects - recursion problem

2005-05-30 Thread Peter Eisentraut
Philip Rhoades wrote: > The following script works (I have confirmed it by doing two separate > views and doing a select on them) - but I don't understand why there > isn't a recursion problem with c1.policy and c2.policy - is there > some sort of trick happening? The subquery is evaluated for eac

[GENERAL] Subselects - recursion problem

2005-05-30 Thread Philip Rhoades
People, The following script works (I have confirmed it by doing two separate views and doing a select on them) - but I don't understand why there isn't a recursion problem with c1.policy and c2.policy - is there some sort of trick happening? Thanks, Phil. SELECT c1.loc, c1.lob, c1.policy FROM

Re: [GENERAL] Subselects - recursion problem

2005-05-30 Thread Martijn van Oosterhout
On Mon, May 30, 2005 at 07:33:04PM +1000, Philip Rhoades wrote: > People, > > The following script works (I have confirmed it by doing two separate > views and doing a select on them) - but I don't understand why there > isn't a recursion problem with c1.policy and c2.policy - is there some > sort