dbTalk Databases Forums  

Oracle Sub Query "not in" problem

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Oracle Sub Query "not in" problem in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Amritha.Datta@gmail.com
 
Posts: n/a

Default Oracle Sub Query "not in" problem - 06-08-2007 , 04:20 AM






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


Reply With Quote
  #2  
Old   
Shakespeare
 
Posts: n/a

Default Re: Oracle Sub Query "not in" problem - 06-08-2007 , 04:40 AM







<Amritha.Datta (AT) gmail (DOT) com> schreef in bericht
news:1181161552.973055.222230 (AT) q19g2000prn (DOT) googlegroups.com...
Quote:
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 think you got an answer to this two days ago......




Reply With Quote
  #3  
Old   
Wazusa Blong
 
Posts: n/a

Default Re: Oracle Sub Query "not in" problem - 06-08-2007 , 08:13 AM



On Jun 8, 4:40 am, "Shakespeare" <what... (AT) xs4all (DOT) nl> wrote:
Quote:
Amritha.Da... (AT) gmail (DOT) com> schreef in berichtnews:1181161552.973055.222230 (AT) q19g2000prn (DOT) googlegroups.com...





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 think you got an answer to this two days ago......- Hide quoted text -

- Show quoted text -
He did. It's too bad he can't accept what has already been told to
him.


David Fitzjarrell



Reply With Quote
  #4  
Old   
DA Morgan
 
Posts: n/a

Default Re: Oracle Sub Query "not in" problem - 06-08-2007 , 10:31 AM



Amritha.Datta (AT) gmail (DOT) com wrote:
Quote:
Is there any alternative query to the below one?
If you want to alienate those who are willing to help you keep
this up. There are at least a dozen alternatives to your
original query and you received a perfectly good solution.

If you want someone else to do your job for you ... go to
c.d.o.marketplace and offer a consulting fee. <g>
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.