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

Home -> Community -> Usenet -> c.d.o.server -> Re: To force type CHAR in a view

Re: To force type CHAR in a view

From: cf <news_at_sitinfo.com>
Date: Tue, 8 Oct 2002 14:21:14 +0200
Message-ID: <3da2cdbb$0$212$4d4eb98e@read.news.fr.uu.net>


Thank you very much for your answer.
Christophe.

"Roman Mirzaitov" <rmirzaitov_at_kt.kg> a écrit dans le message de news: anuf3o$hla9t$1_at_ID-127142.news.dfncis.de...
> Hi,
>
> CREATE OR REPLACE VIEW V1 AS
> select col1,
> cast(rpad(col1,10,' ') as char(10)) new_col1
> from t1
>
> Regards,
> --
> Roman Mirzaitov
> Brainbench MVP for Oracle Administration
> www.brainbench.com
>
>
> "cf" <news_at_sitinfo.com> wrote in message
> news:3da189d5$0$213$4d4eb98e_at_read.news.fr.uu.net...
> > (excuse me, my inglish is not very good)
> >
> > When i create the view V1 I will want to create a column NEW_COL1
CHAR(10)
> > and not VARCHAR2(10)
> >
> > Because I have a utility which at the time of the joint of the view V1
and
> a
> > table with a column in char(10),
> > detects the difference in type.
> >
> > SQL> create table t1 (col1 varchar2(8));
> >
> > SQL> desc t1
> > Name Type
> > ---------------------- -----------------
> > COL1 VARCHAR2(8)
> >
> > SQL> CREATE OR REPLACE VIEW V1 AS
> > select col1,
> > rpad(col1,10,' ') new_col1
> > from t1
> > /
> >
> > SQL> desc v1
> > Name Type
> > --------------------- -----------------
> > COL1 VARCHAR2(8)
> > NEW_COL1 VARCHAR2(10)
> >
> > I will want to create a column NEW_COL1 ==> CHAR(10)
> >
> > Thanks in Advance..
> > With My Best Regards...
> > Christophe
> >
> >
>
>
Received on Tue Oct 08 2002 - 07:21:14 CDT

Original text of this message

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