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

Re: Number coulmn in View

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Mon, 1 Oct 2001 16:11:18 +0100
Message-ID: <3bb8879d$0$8513$ed9e5944@reading.news.pipex.net>


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...

> 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 - 10:11:18 CDT

Original text of this message

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