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

Home -> Community -> Usenet -> c.d.o.misc -> Re: create view problem

Re: create view problem

From: GHouck <hksys_at_teleport.com>
Date: Mon, 13 Mar 2000 00:23:42 -0800
Message-ID: <38CCA58E.201F@teleport.com>


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

Original text of this message

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