Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Updating from two tables

Re: Updating from two tables

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 27 Jul 2006 22:00:27 -0700
Message-ID: <1154019653.927454@bubbleator.drizzle.com>


RiseY3K_at_gmail.com wrote:
> Hi,
>
> TABLE table_a
> (
> change_date DATE NOT NULL,
> id NUMBER(3) NOT NULL,
> pri_order VARCHAR2(5),
> sec_order VARCHAR2(5),
> ...
> media_id NUMBER(4) NOT NULL
> );
>
> TABLE table_b
> (
> change_date DATE NOT NULL,
> id NUMBER(3) NOT NULL,
> pri_order VARCHAR2(5),
> sec_order VARCHAR2(5),
> ...
> name VARCHAR(21)
> );
>
> I would like to update table_b from table_a with pri_order and
> sec_order for every matching id. This looks like a fairly easy sql
> statement, but I have tried many sql statement and looked for help and
> but couldn't get it to work. I am using an oracle database.
>
> Thanks in advance,
> - Kevin
>

Morgan's Library at www.psoug.org. Click on UPDATE STATEMENTS.

You will find a working demo.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Fri Jul 28 2006 - 00:00:27 CDT

Original text of this message

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