Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Update view
If you make sure the column synonym is uppercase (as below) then your
error goes away. However you then get another one that I don't understand.
Someone else will have to answer that.
1 create view tt as
2 select t1.c1, t1.c2, t2.c2 "C4"
3 from t1, t2
4* where t1.c1 = t2.c1
View created.
SQL> update tt
2 set c4 = c2
3 /
set c4 = c2
*
ERROR at line 2:
ORA-01779: cannot modify a column which maps to a non key-preserved table
--
Kevin A Lewis (BOCM PAULS LTD) - Animal Feed Manufacturer - Ipswich United
Kingdom)
<Kevin_A_Lewis_at_Hotmail.com>
The views expressed herein by the author of this document
are not necessarily those of BOCM PAULS Ltd.
Maggie <maggiezhou_at_hotmail.com> wrote in message
news:8c1ht4$uo$1_at_web1.cup.hp.com...
> When I try to update a view, I get an error:
>
> CREATE TABLE t1
> (
> c1 NUMBER,
> c2 NUMBER
> )
>
> CREATE TABLE t2
> (
> c1 NUMBER,
> c2 NUMBER
> )
>
> create view tt as
> select t1.c1, t1.c2, t2.c2 "c4"
> from t1, t2
> where t1.c1 = t2.c1
>
> update tt
> set c4 = c2
> and I get " ORA-00904: invalid column name "
>
> Please tell me why?
>
>
>
>
Received on Fri Mar 31 2000 - 04:21:19 CST
![]() |
![]() |