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: Help!!! Urgent Query on size limit of Number type field

Re: Help!!! Urgent Query on size limit of Number type field

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 24 Mar 2003 21:25:09 -0600
Message-ID: <u1y0wlzom.fsf@hotpop.com>


On 24 Mar 2003, kanvpandit_at_hotmail.com wrote:
> I have a few critical tables containing Number type fields
> [Number(18,3)]. But when an attempt is made to insert a number in the
> format of 14 intergers, one decimal point and 3 decimal values (all
> adding upto 18), it truncates the decimal values refuses to insert the
> amount sometimes. Whats going wrong here? Is there a limit to the
> number of decimals which can be stored? whats the limit for a number
> type field?

Let me guess. Your analysis is based on front-end programming logs?

What is the exact insert statement which actually errors out? Have you tried that erroring statement within a sqlplus session?

Here's a sample sqlplus session.

    SQL> create table t1 (fld number (18,3));

    Table created.

Your example:

    SQL> insert into t1 values (12345678901234.123);

    1 row created.

The maximum example:

    SQL> insert into t1 values (123456789012345.123);

    1 row created.

The expected error:

    SQL> insert into t1 values (1234567890123456.123);     insert into t1 values (1234567890123456.123)

                           *

    ERROR at line 1:
    ORA-01438: value larger than specified precision allows for this column

Works like this everytime, all the time, in sqlplus. Can't really be assured whats going on in when the _exact_ executing statement isn't known. Please post the ddl and exact statement, after you've tried it in sqlplus.

-- 
Galen deForest Boyer
Sweet dreams and flying machines in pieces on the ground.
Received on Mon Mar 24 2003 - 21:25:09 CST

Original text of this message

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