Path: news.f.de.plusline.net!news-fra1.dfn.de!news.tele.dk!feed118.news.tele.dk!postnews.google.com!z28g2000prd.googlegroups.com!not-for-mail
From:  Amritha.Datta@gmail.com
Newsgroups: comp.databases.oracle.server
Subject: "Not in" subquery
Date: Wed, 06 Jun 2007 13:22:14 -0700
Organization: http://groups.google.com
Lines: 22
Message-ID: <1181161334.045765.206080@z28g2000prd.googlegroups.com>
NNTP-Posting-Host: 12.180.111.254
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1181161371 28169 127.0.0.1 (6 Jun 2007 20:22:51 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 6 Jun 2007 20:22:51 +0000 (UTC)
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: z28g2000prd.googlegroups.com; posting-host=12.180.111.254;
   posting-account=6Swc_g0AAAAHBdgsqoSgMrgOVOv_Q0HR
Xref: news.f.de.plusline.net comp.databases.oracle.server:199044

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

