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: datatype in view

Re: datatype in view

From: Ole Christian Meldahl <konocm_at_statoil.com>
Date: Tue, 26 Oct 1999 10:13:38 +0200
Message-ID: <381562B2.6AB34D49@statoil.com>


Ty O'Kelly wrote:

> hi,
>
> i am creating a view that is built from from a table and another view.
> it is constructed like this:
>
> create view view1 as
> select a.column1,
> decode(a.column2,'T',a.column3,b.column3) column3
> from table1 a,
> view1 b
> where a.column1 = b.column1
>
> i need the datatype for view2.column3 to be a char(10). is there a way
> to force the use of this datatype in the creation of the view.
>

Sligthly confused(there is no view2 here) I can give this advice:

rpad( decode(a.column2,'T',a.column3,b.column3), 10) column3

ole c Received on Tue Oct 26 1999 - 03:13:38 CDT

Original text of this message

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