Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer Join to a subquery alternative?

Re: Outer Join to a subquery alternative?

From: John <Nothanks_at_noaddress.com>
Date: Fri, 6 Feb 2004 14:00:14 +0000 (UTC)
Message-ID: <Xns94878EA53F055Nothanksnoaddresscom@127.0.0.1>


Ed Prochak <ed.prochak_at_magicinterface.com> wrote in news:1pqUb.233$hJ6.115_at_fe01.usenetserver.com:

> John wrote:
>

>> Oracle doesnt like
>> 
>> select whatever
>> from maintable m,
>> childtable c
>> where c.seq(+)=(select max(seq) from childtable c where
>> maintableseq=m.seq) 

> Your hint is in your question, to do an OUTER JOIN, you need to do a
> JOIN first. IOW, get rid of the subquery.
>
>
> If that not enough of a hint, here's a second one. Don't peek unless
> you really need it.
> ready?
> look up the phrase "in-line view"

Was a good reason why I didnt want to do it like this: the where clause in the main query is quite lengthy, and I dont want to duplicate it within a subquery. This would have a knockon effect to performance, whereas a subquery in the where clause in this way would implicitly only run for records in the main query that meet criteria.

Cheers Received on Fri Feb 06 2004 - 08:00:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US