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

Home -> Community -> Usenet -> c.d.o.misc -> Constants in package?

Constants in package?

From: <jboes_at_qtm.net>
Date: Fri, 15 May 1998 15:27:18 GMT
Message-ID: <6jhmsm$7bk$1@nnrp1.dejanews.com>


Judging by the archive at DejaNews (www.dejanews.com), this topic seems to come up periodically ...

I have defined a package to declare constants:

create package my_const is
 C_ONE
   CONSTANT
   INTEGER
   := 1;
end my_const;

create package body my_const is
end my_const;

I reference the constant (in a trigger, if that matters). When I execute a triggering statement, I get:

ERROR at line 1:

ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "ME.MY_CONST", line 3
ORA-06512: at line 11
ORA-04088: error during execution of trigger

Oddly enough, if I execute the code again, the trigger appears to complete without the error.

What gives?

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Fri May 15 1998 - 10:27:18 CDT

Original text of this message

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