Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: VIEW UPDATE PROBLEM
FORMULA_FO_at_yahoo.com wrote:
: We have lots of old applications that update
: coloumns that do not exist in current database.
: Is it possible to define a view with these coloumns
: as dummy and possible to update?
: I.e when application update dummy view coloumns,
: no update is performed in the database.
:
: We use ORACLE 7.2.3 on an AIX 4.1.4 platform
: with PL/SQL.
:
: Thanks!
:
: Morten
I doubt very much but let the idea have a try. So I did some experiments:
SQL> create table test1(f1 number);
Table created.
SQL> create view v_test1 as
select f1, 0 dummy_col from test1;
View created.
SQL> insert into test1 values(0);
1 row created.
SQL> commit;
Commit complete.
SQL> update v_test1
2 set f1 = 1;
1 row updated.
SQL> update v_test1
set dummy_col = 1;
2 set dummy_col = 1
*
ERROR at line 2:
ORA-01733: virtual column not allowed here
This is what I expected. I can't imagine other ways to create 'ghost' columns and therefore has to conclude that you can't do what you want. Maybe an Oracle guru can correct me. I look forward for that !
Christian Mondrup, Computer Programmer
Scandiatransplant, Skejby Hospital, University Hospital of Aarhus
Brendstrupgaardsvej, DK 8200 Aarhus N, Denmark
Phone: +45 89 49 53 01, Telefax: +45 89 49 60 07
Received on Wed Apr 29 1998 - 07:58:13 CDT