Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> UNION CASTING .
Can anyone help me with this ?
Try the following SQL.
--create table table1 (col1 integer not null)
--create table table2 (col1 integer not null)
--create view view1 as select * from table1
---union all select * from table2
if you then do select column_name,nullable from user_tab_columns where
table_name='VIEW1'
the result is that col1 can contain nulls, which is incorrect.
Try it on your own system - happens at least on Dynix and Win2000. V817
Does anyone know how to hack the data dictionary to force this to be not-null ? (i.e. correct )
Creating another view on top of this (AS SELECT COL1 from VIEW1 WHERE COL1
is NOT NULL )
does not work .
This is a small case of a much larger production issue. The view cannot be
replaced with a table.
TIA !
Received on Fri Apr 27 2001 - 05:27:54 CDT