Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Number coulmn in View
Unchecked
create or replace view new_view
(
id number(8),
quantity number(8),
month
)
as select
id,
quantity,
month
from table1;
-- Niall Litchfield Oracle DBA Audit Commission UK "Sunder" <sunder.nochilur_at_us.bosch.com> wrote in message news:3BB8681D.504DBEFD_at_us.bosch.com...Received on Mon Oct 01 2001 - 10:11:18 CDT
> 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
>
![]() |
![]() |