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 -> Number coulmn in View

Number coulmn in View

From: Sunder <sunder.nochilur_at_us.bosch.com>
Date: Mon, 01 Oct 2001 08:57:01 -0400
Message-ID: <3BB8681D.504DBEFD@us.bosch.com>


Hello Oracle world,

    I am trying to create a view in Oracle 8.0.4.2.1

create or replace view new_view
(

id,
quantity,
month
)
as select
id,
quantity,
month
from table1;

when i do a describe of this view I get the following output.

DESC NEW


ID                            NUMBER(8)
QUANTITY            NUMBER(8)
MONTH                 DATE

If i use the following sql to create my NEW_VIEW the quantity column becomes NUMBER instead of NUMBER(8)

create or replace view new_view
(

id,
quantity,
month
)
as select
id,
quantity,
month
from table1
union all
select
id,
0,
month
from table2;

I have tried using to_number('0','9999999') instead of 0 in the above query. But still when I describe the view I get QUANTITY NUMBER. Is there a way of getting QUANTITY NUMBER(8) from my second create statement.

Thanks,
Sunder Received on Mon Oct 01 2001 - 07:57:01 CDT

Original text of this message

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