Thread: PL/SQL ORA-06512 Error
-
PL/SQL ORA-06512 Error
Hi friends
this is a very simple procedure but for some reason it's giving the dreaded ORA-06512 Error. Please advise.
Code sql:CREATE OR REPLACE PROCEDURE getprojectdescription (
v_project_id IN NUMBER,
v_project_description OUT VARCHAR2
)
AS
BEGIN
SELECT project_description
INTO v_project_description
FROM projects
WHERE project_id = v_project_id;
END;
/
Thanks
- Club-Oracle Complementary E-Books and Magazines
Get your free Complementary Copy of Oracle Magazine
You can also browse the Free Magazines and E-Books section to see the complete list of free magazines, e-books and Whitepapers.
-
Re: PL/SQL ORA-06512 Error
your procedure looks fine to me, could you post the error code and the desc table for projects. Seems like you might have a column length problem with the data that your query is returning.
-
Re: PL/SQL ORA-06512 Error
The ORA-06512 error itself does not indicate the actual error . It normally indicates the line number at which the oracle PL/SQL code has caused an error . There will be another main error occurred in your process and that error happened in the line number as mentioned in ORA-06512 message description.
As tyro assumed, it could be data type length issue with the OUT variable v_project_description (in comparison with length of column value project_description) while calling the procedure. please check it.
Raj.
-
Re: PL/SQL ORA-06512 Error
Thanks for your replies guys
yes the actual error is
Code sql:ORA-06502: PL/SQL: numeric OR value error: character string buffer too small
Any suggestions?
-
Re: PL/SQL ORA-06512 Error
The reason is already mentioned.
The data type length of v_project_description is less than the actual Data type length of the column projects.project_description.
Increase the data type length of v_project_description while calling the procedure.
Raj.


LinkBack URL
About LinkBacks
Reply With Quote


