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: update from two tables

Re: update from two tables

From: Jerry D <jdubuke_at_notme.gpdservices.com>
Date: Thu, 1 Aug 2002 13:23:20 -0400
Message-ID: <3d496e91$0$7554$4c41069e@reader0.ash.ops.us.uu.net>


no - one is an order number and the other is the item being ordered.... "TurkBear" <jgreco1_at_mn.rr.com> wrote in message news:sleikuoj66fouhr35g23psnfopo7jf6rfu_at_4ax.com...
> One more bit of info needed ( I hope):
> Is the RQ_MOCNUMBER RQ_IMKEY combo unique?
> In other words, do any records have the same RQ_MOCNUMBER and RQ_IMKEY ?
>
>
> "Jerry D" <jdubuke_at_notme.gpdservices.com> wrote:
>
> >OK - here is a snapshot of the relevant data...
> >
> >IM Table - 15K rcds
> >IM_KEY (Unique) (varchar2,30)
> >IM_ALLOC (number,7,0)
> >{other non-relevant fields}
> >
> >RQ Table - 168K rcds
> >RQ_IMKEY (varchar2,30)
> >RQ_QTY_REQ (number,7,0)
> >RQ_MOCNUMBER (varchar2,30)
> >{other non-relevant fields}
> >
> >RQ Data
> >RQ_MOCNUMBER RQ_IMKEY RQ_QTY_REQ
> >A0111052 ASLAN4 5
> >A0111052 ASRAB1 8
> >A0111052 RS325 3
> >A0111058 ASLAN4 3
> >A0111058 ASRAB1 6
> >A0111058 RS325 2
> >A0111058 SPAD32 8
> >{lots of other non-relevant data}
> >
> >IM Data
> >IM_KEY IM_ALLOC
> >ASLAN1 32
> >ASLAN4 27
> >ASRAB1 12
> >RS324 15
> >RS325 18
> >SPAD31 12
> >SPAD32 4
> >{lots of other non-relevant data}
> >
> >So, if I wanted to update for A0111058, I need IM_ALLOC to reflect the
new data as follows:
> >IM_KEY IM_ALLOC(old) IM_ALLOC(new)
> >ASLAN4 27 30
> >ASRAB1 12 18
> >RS325 18 20
> >SPAD32 4 12
> >
> >So, I need the query to *only* update the 4 relevant records, and
obviously a table scan gets a bit hairy with the size of my table(s).
> >
> >Hope this helps - it should be soooo simple, no?? But it is driving me
nuts!!
> >
> >Jerry
> >
> >{SNIP SNIP SNIP SNIP SNIP}
>
>
>
> -----------== Posted via Newsfeed.Com - Uncensored Usenet News
==----------
> http://www.newsfeed.com The #1 Newsgroup Service in the World!
> -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers
=----- Received on Thu Aug 01 2002 - 12:23:20 CDT

Original text of this message

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