Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Printing OUT variables from a Stored Procedure

602753Oct 11 2007 — edited Oct 12 2007
Hi all,

I'm running an SQL command that calls a Stored Procedure and passes in some value. I've pasted in the important parts of it below. What I am trying to do is access the OUT variables that have been assigned to the DECLARED variables. I come from a SQL Server background and there we can do "SELECT @variable" which will print it to screen. I'm trying to do something similar here.

I need to access the contents of the three variables declared at the top of the script.

Thanks in advance.
DECLARE
l_error_value NUMBER;
l_error_product VARCHAR2 (10);
l_CE_DOC_ID number;

BEGIN 
PEM.create_enquiry    
	(      ce_cat => 'COMP'
               , ce_class => 'FRML'
               ...

               ...
               , error_value => l_ERROR_VALUE
               ,error_product => l_ERROR_PRODUCT
               , ce_doc_id => l_ce_doc_id
    );
END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 9 2007
Added on Oct 11 2007
11 comments
6,572 views