Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Basic pl/sql question

RE: Basic pl/sql question

From: Lyall Barbour <lyallbarbour_at_sanfranmail.com>
Date: Fri, 19 May 2000 22:06:22 -0400 (EDT)
Message-Id: <10502.106155@fatcity.com>


Your declaration says that the data in the variable can only be 2 bytes long. But you want to say 3 bytes with the decimal. That's why (3,2) works. This has happened to other people I've worked with.

Lyall

------Original Message------
From: "Nguyen, Long" <Long.Nguyen_at_its.csiro.au> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Sent: May 19, 2000 3:25:25 AM GMT
Subject: Basic pl/sql question

Hi,

I have got the very simple pl/sql pgm below:

1 create or replace procedure atest
2 as
3 rate number(2,2);
4 begin
5 rate := 7.8 ;
6* end;

When I executed this procedure I got the following error

ERROR at line 1:

ORA-06502: PL/SQL: numeric or value error: number precision too large
ORA-06512: at "NGU059.ATEST", line 5
ORA-06512: at line 1

Why?

If I changed declaration of variable rate to number(3,2) the procedure is executed ok. Why?

Thanks.

--
Author: Nguyen, Long
INET: Long.Nguyen_at_its.csiro.au

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

______________________________________________
FREE Personalized Email at Mail.com
Received on Fri May 19 2000 - 21:06:22 CDT

Original text of this message

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