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 -> 10g Bug with Numeric Precision/Scale?

10g Bug with Numeric Precision/Scale?

From: James Carr <drjamescarr_at_gmail.com>
Date: 7 Sep 2005 07:55:48 -0700
Message-ID: <1126104948.516392.190170@g43g2000cwa.googlegroups.com>


I've encountered something that I believe is a bug in PL/SQL under 10g (at least on 10.1.0.3).
Here's an example script:



SET SERVEROUTPUT ON SIZE 1000000 CREATE TABLE MYTABLE (MYCOL NUMBER(12,2)); DECLARE
PROCEDURE foo(a NUMBER, b MYTABLE.MYCOL%TYPE) IS a1 NUMBER(12,2) := a;
a2 MYTABLE.MYCOL%TYPE := a;
a3 NUMBER(12,3) := a;
b1 NUMBER(12,2) := b;
b2 MYTABLE.MYCOL%TYPE := b;
b3 NUMBER(12,3) := b;
BEGIN
DBMS_OUTPUT.Put_Line(a);
DBMS_OUTPUT.Put_Line(a1);
DBMS_OUTPUT.Put_Line(a2);
DBMS_OUTPUT.Put_Line(a3);
DBMS_OUTPUT.Put_Line(b);
DBMS_OUTPUT.Put_Line(b1);
DBMS_OUTPUT.Put_Line(b2);
DBMS_OUTPUT.Put_Line(b3);

END;
BEGIN
foo(1.23100007, 1.23100007);
END;
/

DROP TABLE MYTABLE;


The output is as follows on 10.1.0.3.0:

1.23100007
1.23
1.23
1.231
1.23100007
1.23100007
1.23100007
1.231

and on an old 8.1.7.2.0 database (I don't have 9i handy)

1.23100007
1.23
1.23
1.231
1.23100007
1.23
1.23
1.231

Comments? Received on Wed Sep 07 2005 - 09:55:48 CDT

Original text of this message

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