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: puzzled by ora-01438

Re: puzzled by ora-01438

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 5 Mar 2004 19:54:10 +0100
Message-ID: <4048cca8$0$299$636a15ce@news.free.fr>

"Ed Stevens" <nospam_at_noway.nohow> a écrit dans le message de news:kmfh40tj2o2i2redknef1focghtf1ebif8_at_4ax.com...
> Oracle 8.1.7.4 on Win2k
>
> In trying to introduce a little more real-world-ness to some testnig
> I'm doing (see thread "need ideas for proof test") and am having a bit
> of trouble with generating a random number to use as a column value.
>
> Here's the first part of the table def:
>
> CREATE TABLE .EDS_TEST_KEY_FIRST
> (
> SUPL_KEY NUMBER(3) NOT NULL,
> CLM_KEY CHAR(8) NOT NULL,
> LIAB_AMT NUMBER(9,2) NOT NULL,
> <snip>
>
> And here's the code I'm using to load it:
>
> truncate table .EDS_TEST_KEY_FIRST;
>
> BEGIN
> DBMS_RANDOM.INITIALIZE (12345);
>
> FOR i IN 1..5000
> LOOP
>
> INSERT INTO PUR003.EDS_TEST_KEY_FIRST
> VALUES
> (i,
> substr(to_char(dbms_random.random),1,8),
> 1234567.12,
> <snip>
>
> If I set the loop for 500, everything works as planned. But when I
> bump it to 5000, I get this:
>
> BEGIN
> *
> ERROR at line 1:
> ORA-01438: value larger than specified precision allows for this
> column
> ORA-06512: at line 7
>

5000 can't be inserted in a number(3).
See first value of your insert.

Regards
Michel Cadot Received on Fri Mar 05 2004 - 12:54:10 CST

Original text of this message

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