The ORA-06512 error doesn’t tell you what is wrong, it tells you in which object at which line the error occurred. The error doesn’t mean much by itself. It is simply the catch-all Oracle error for PL/SQL (procedural SQL) exceptions. This error is almost always preceded by a different message stating the reason for the error.
Check the error that immediately precedes your first ORA-06512 error and concentrate on solving the problem it describes.
[code language=”sql”]SQL> declare a number; begin a := ‘A’; end;
declare a date; begin a := ‘A’; end;
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at line 1[/code]