I'm trying to do a character to number conversion but the system doesn't let me and threw me the ORA-06502 ERROR .
This is the code that I'm trying to compile :
VPARAMETROS_MENSAJE VARCHAR2(2000);
ERROR_NUMBER NUMBER;
BEGIN
ERROR_NUMBER := 0;
ERROR_NUMBER := SQLCODE;
VPARAMETROS_MENSAJE :='{' +'"ERROR_NUMBER":"' + CAST('ERROR_NUMBER' AS
VARCHAR2) + '",' +'}' ;
THANKS YOU ALL!
I found the mistake traducing the code that I was trying to compile from Microsoft SQL Server to Oracle and it's finally works.
The error was in this line.
VPARAMETROS_MENSAJE :='{' ||'"ERROR_NUMBER":"' || CAST('ERROR_NUMBER' AS VARCHAR2) || '",' ||'}' ;