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: Update in joined tables???

Re: Update in joined tables???

From: Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de>
Date: Sat, 20 Jan 2001 18:30:01 +0100
Message-ID: <3A69CB19.A1207648@0800-einwahl.de>

create table tab1 (id number, field1 number, field3 varchar2 (5)); create table tab2 (id number primary key, field2 number);

UPDATE (

	select	tab1.field1
	from	tab1, tab2
	where	tab1.id = tab2.id (+)
	and	tab2.field2 < 1
	and	tab1.field3 = 'Debug'

) x
SET x.field1=0;

commit;

Martin

"Ståle Veipe" wrote:
>
> I have a script that i cant get to work on oracle isnt this possible to do
> on oracle server?
>
> UPDATE tab1 SET tab1.field1=0 FROM tab1 LEFT OUTER JOIN tab2 ON (tab1.id =
> tab2.id) WHERE tab2.field2 < 1 AND tab1.field3='Debug'
>
> I can do select this way (not on oracle though). Can this be done? or does
> anyone hava another sollution?
Received on Sat Jan 20 2001 - 11:30:01 CST

Original text of this message

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