Re: Simple Join Update.
From: Frank <fvanbortel_at_netscape.net>
Date: Thu, 10 Apr 2003 19:37:31 +0200
Message-ID: <3E95ABDB.90403_at_netscape.net>
Date: Thu, 10 Apr 2003 19:37:31 +0200
Message-ID: <3E95ABDB.90403_at_netscape.net>
andrewdmetcalfe_at_hotmail.com wrote:
> I'm perplexed that I'm unable to do a rather simple join update.
>
> update a
> set a.col2 = b.col2
> where a.col1 =b.col1
>
> I get an error message saying ORA00904: invalid column name on
> "b.col1".
>
You want what to be updated from b? Where is your reference to table b?
update a set col2 = (select b.col2 from b where b.col1 = a.col1)
Brackets may be wrong
-- Regards, Frank van BortelReceived on Thu Apr 10 2003 - 19:37:31 CEST