Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Updateable View with Select Union

Updateable View with Select Union

From: Govindan K <gkatteri_at_yahoo.co.uk>
Date: Thu, 20 Mar 2003 23:09:17 +0000 (GMT)
Message-Id: <24726.322587@fatcity.com>


Hi list

I need help on this. Trying to create a view with select union all as part of it.

SQL> @view01b
SQL> create table t1 (ind1 varchar2(02) , rundate1 date)   2 /

Table created.

SQL> create table t2 (ind2 varchar2(02) , rundate2 date)   2 /

Table created.

SQL> insert into t1 values('T1' , sysdate - 100)   2 /

1 row created.

SQL> insert into t2 values('T2' , sysdate)   2 /

1 row created.

SQL> create view v1 as
  2 select ind1 , rundate1 from t1
  3 union all
  4 select ind2 , rundate2 from t2
  5 with check option
  6 /

View created.

SQL> select * from v1
  2 /

IN RUNDATE1
-- ---------

T1 10-DEC-02
T2 20-MAR-03 SQL> desc v1

 Name                                      Null?    Type
 ----------------------------------------- --------
----------------------------
 IND1                                              
VARCHAR2(2)
 RUNDATE1                                           DATE

SQL> / IN RUNDATE1
-- ---------

T1 10-DEC-02
T2 20-MAR-03 SQL> insert into v1 values ('T3' , sysdate + 10)   2 /
insert into v1 values ('T3' , sysdate + 10)

            *
ERROR at line 1:
ORA-01732: data manipulation operation not legal on this view

SQL> set echo off

Any ideas?

TIA



Do You Yahoo!?
Everything you'll ever need on one web page Received on Thu Mar 20 2003 - 17:09:17 CST

Original text of this message

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