Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: create view problem
www_dba_at_my-deja.com wrote:
>
> 1 create view tempvw1 as select audit_date date2 from table1
> 2 union
> 3* select null date1 from table2;
>
> create view tempvw1 as select audit_date date2 from person
> *
> ERROR at line 1:
> ORA-01790: expression must have same datatype as corresponding
> expression
>
> How can I overcome this problem?
> TIA.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Perhaps the following will work, although I'm not sure why you would do it since you would lose the NULLs (but one) unless you did a 'UNION ALL'; but, perhaps that is your goal:
create view tempvw1 as
select audit_date date2 from table1
union
select TO_DATE(null) date1 from table2;
Yours,
Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys
Received on Mon Mar 13 2000 - 02:23:42 CST
![]() |
![]() |