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 -> Update in a self join

Update in a self join

From: <joker197cinque_at_gmail.com>
Date: 9 Feb 2007 00:54:30 -0800
Message-ID: <1171011270.872472.148840@m58g2000cwm.googlegroups.com>


I have a table and I would like to update some columns of a dataset of these table with values of another dataset of the same table.

I'm trying this way:

update tab_join_1 p
set p.nome =
(select n.nome from tab_join_1 n where n.key = p.key)
where exists
(select 'x'

 from tab_join_1 n
 where p.key = n.key);

I obtain an error of more rows returned in subquery.

Any help much appreciated.

Regards. Received on Fri Feb 09 2007 - 02:54:30 CST

Original text of this message

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