0

I have noted from here that the expected width of a number data type is dynamically set to whatever you need up to a precision of 21 bytes, however I can see in my code that the line

MAX_LENGTH CONSTANT NUMBER := 2000;

is throwing the error:

BEGIN
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "DBAuser.MAKE_VIEWS", line 58

Am I misinterpreting the error, or is it possible that the CONSTANT modifier is changing something that I don't expect? Is there a system level setting which can change the default width of number types?

Edited to reflect more accurate title - issue is that I am looking at what I think is line 58 but it's really not

Community
  • 1
  • 1
GKen
  • 41
  • 1
  • 6
  • 5
    The error is not on the line 1 it is on line 58, what has on that line? at this object : `DBAuser.MAKE_VIEWS` – Jorge Campos Feb 09 '14 at 14:05
  • @JorgeCampos yeah the line I've copied there is line 58 - I understand that :) – GKen Feb 09 '14 at 19:48
  • 1
    The assignment you've shown has nothing to do with a character conversion, which is what's failing. I've found that sometimes the line number reported isn't the actual failing line. Do you have any `TO_CHAR` calls, or are you concatenating a number onto a character string somewhere? – Bob Jarvis - Слава Україні Feb 09 '14 at 21:50
  • 1
    Query `USER_SOURCE` to get the real line 58 – Jeffrey Kemp Feb 10 '14 at 03:41
  • thanks @JeffreyKemp - recompiled packages and queried the user source as suggested - had to trace back a few files but the culprit was found on a line which made much more sense than the one I was looking at...you want to re-write your comment as an answer and I can mark it as the solution? – GKen Feb 10 '14 at 11:46

1 Answers1

0

Query USER_SOURCE to determine exactly which line the error is complaining about.

Jeffrey Kemp
  • 59,135
  • 14
  • 106
  • 158