Re: Update statmennt on ORACLE 7.1
Date: Sun, 27 Nov 1994 20:42:04 +0000
Message-ID: <806620770wnr_at_toronto.demon.co.uk>
In article: <1994Nov24.061834.21879_at_ncn.siemens-nixdorf.no> svb_at_siemensnixdorf.no (Sven Brenna)
writes:
>
> I wonder if anybody can give me an answer to this problem:
>
> In Sybase you can write following statment
> update table A set col3 = X
> from table A, table B
> where A.c1 = B.c1 and A.c2 = B.c2 and ......( more conditions)
>
> The point is that you can use more than one table in the update statment. In
> Oracle 7.1 you can use subqueries, but the join I need to do have to columns
> as primary key.
>
> Sven Brenna
> DocuLive
> Siemens Nixdorf Informasjonssystemer A/S, Norway
>
> **************************************
> The Document is dead. Long live the document.
> **************************************
>
update table C
set col3 = X
where C.rowid in (
select A.rowid from table A, table B where A.c1 = B.c1 and A.c2 = B.c2 and ......( more conditions) );
.. Is how I used to do this. Version 7.0 has a PL/SQL bug that won't let you do this directly (the ROWID has to be obtained from a view). Oracle said it would be fixed in 7.1... so please let me know if it works.
John Thomas, Oracle Team Leader E-Mail: John_at_toronto.demon.co.uk The shorter the sig, the smarter the author. Tel: 0181 944 9858Received on Sun Nov 27 1994 - 21:42:04 CET