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: Tim C <NOTCornwell_at_NOTcs.NOTcornell.NOTedu>
Date: Thu, 1 Aug 2002 13:24:44 -0400
Message-ID: <aibqt4$hv8$1@news01.cit.cornell.edu>


Jerry D,

Did you ever get this resolved??

I have what seems to be the exact requirement, but cannot find any examples of howthis might be done.

I don't have much experience with Oracle, but this seems like it should be so very simple:

Table_A has field_X
Table_B has fieldY

BOTH tables have key value Z

Find where the (unique) key values from A are in B, and update field_X in A to be some kind of product of the tableA and TableB fields.

Sounds easy. I think Access & SQL Server can do this easily.

What am I missing?

Tim

"Jerry D" <jdubuke_at_notme.gpdservices.com> wrote in message news:3d480aec$0$397$724ebb72_at_reader2.ash.ops.us.uu.net...
> Hi all,
> I have read past posts on this, but I cannot "fit" it to my needs -
> I have 2 tables (im and rq) - the relationship is rq_imkey = im_key.
> I need to update the im_alloc field as follows:
> im_alloc = im_alloc + rq_qty_req
> where the rq_mocnumber = 'xxxxx'.
>
> The select statement is the easiest to describe what I need:
>
> select im_key, im_alloc, rq_qty_req from up.im, up.rq where rq_mocnumber =
> 'A0111058' and im_key = rq_imkey;
>
> This query will generate the resultset I need, now I need to update the IM
> table with the above values!
>
> Dont know why I have such a block with this, can anyone help??
>
> Jerry
>
>
>
Received on Thu Aug 01 2002 - 12:24:44 CDT

Original text of this message

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