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

puzzled by ora-01438

From: Ed Stevens <nospam_at_noway.nohow>
Date: Fri, 05 Mar 2004 12:09:23 -0600
Message-ID: <kmfh40tj2o2i2redknef1focghtf1ebif8@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 Received on Fri Mar 05 2004 - 12:09:23 CST

Original text of this message

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