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 rows in a table get ora-error 01779

Re: Update rows in a table get ora-error 01779

From: Tom Best <oracle_person_at_yahoo.com>
Date: Tue, 16 Jul 2002 08:56:43 -0400
Message-ID: <ah11fe$vo6$1@news.bentley.com>


JC:

You don't say what the primary key is, and that is important. The key of tab1 must also be a key of the resulting join. That would be the case, for example, if tab1.field1x and tab2.field2x were the respective primary keys. The equijoin forces those keys to also be keys of the resulting join.

Hope this helps,
Tom Best

"jc" <jc_coron_at_hotmail.com> wrote in message news:56a41cb6.0207151501.7721ee76_at_posting.google.com...
> Hi,
>
> I'm trying to update a table. The following sql still doesn''t work I get
the error:
> ORA-01779: cannot modify a column which maps to a non key-preserved
> table".
>
> However both are base tables and have their primary keys.
>
> Much appreciate any help!
>
>
> update (
> select tab1.x tobeupdated,
> tab2.y tobequal
> from tab1, tab2
> where tab1.field1x = tab2.field2x
> and tab1.field1y = tab2.field2y
> )
> set tobeupdated = tobequal
>
> Thanks,
>
> JC
Received on Tue Jul 16 2002 - 07:56:43 CDT

Original text of this message

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