Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: "Not in" subquery
On Jun 6, 4:31 pm, "fitzjarr..._at_cox.net" <fitzjarr..._at_cox.net> wrote:
> On Jun 6, 3:22 pm, Amritha.Da..._at_gmail.com wrote:
>
>
>
> > Hello,
>
> > Is there any alternative query to the below one?
>
> > update RTable set Reason = "XYZ"
> > Where FKey = 1234
> > and SFKey = 1
> > and Reason Is Null
> > and F_ID not in ( Select F_ID from RTable
> > Where FKey = 1234
> > and SFKey = 1
> > and TO_NUMBER(REL_CD) = 1
> > and Reason Is Null);
>
> > "not in" in the above query is taking alot of time and it is timing
> > out.
>
> > Please Advise.
>
> > Thanks
>
> I can only presume there is an index on (FKey,SFKey)? Also, why are
> you using full quotes around your replacement text ("XYZ")? Those
> should be single-quotes ('XYZ').
>
> Of course we can't really say much without an Oracle release (to four
> numbers) and an explain plan...
>
> David Fitzjarrell
Sorry it should be 'XYZ'. I am using Oracle 9i.
Thanks Received on Fri Jun 08 2007 - 04:17:38 CDT
![]() |
![]() |