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 on a table with char column creates it as a varchar2

Re: create view on a table with char column creates it as a varchar2

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Thu, 19 Jan 2006 07:06:39 +0100
Message-ID: <43cf2c6e$0$7783$626a14ce@news.free.fr>

<indiaconsultant1_at_gmail.com> a écrit dans le message de news: 1137650047.349214.70020_at_g43g2000cwa.googlegroups.com...
| But why does the view get created with a different datatype than the
| underlying table?
|
| On the original table the act field is char(10), why does the view
| change it to a varchar2?
|

You didn't directly use the field you used a decode and its first output value ('NINE') is of type VARCHAR2. Use cast if you want to change the default datatype: "cast(decode(...) as char(10))".

Regards
Michel Cadot Received on Thu Jan 19 2006 - 00:06:39 CST

Original text of this message

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