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: SQLPLUS vs PL/SQL question

Re: SQLPLUS vs PL/SQL question

From: replace this with _at_ <_at_)xs4all.nl>
Date: Tue, 23 Jun 1998 19:48:55 GMT
Message-ID: <35900455.8680782@news.xs4all.nl>


On 23 Jun 1998 14:15:04 GMT, iancrozier_at_aol.com (Iancrozier) wrote:

>I need to change the value in one column of a table by adding the value of a
>column in a different table to it and putting the result back into the original
>column of the first table i.e. I want
>column 1 of table 1 to equal column 1 of table 1 plus column 2 of table 2.

update table1
set table1.column_a =
(select table1a.column_1 + table2.column_b   from table1 table1a, table2
  where table1a.rowid = table1.rowid
  and table2.column_??? = table1.column_?? )

Will this do?


Received on Tue Jun 23 1998 - 14:48:55 CDT

Original text of this message

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