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!

Returning Oracle Output Parameters from Stored Procedures

439241Feb 28 2005 — edited Feb 28 2005
Hi,

Please forgive my ignorance of Oracle and PL/SQL. I'm trying to get a value out of a stored proc which I've written. The proc takes a username input parameter and returns a user guid through an output parameter. I'm able to print the output parameter to the DBMS Output but can't figure out how to return the thing in a record when calling the proc through a normal sql prompt!

My call is like so:

DECLARE
nGUID NVARCHAR2(255);
BEGIN
GETUSER(nGUID, 'WHY-DEV-QSYS-Tim Watson');
DBMS_OUTPUT.PUT_LINE (nGUID);
/*
Would like to return the value here; what's the syntax?
*/
END;

The signature of the proc is

CREATE OR REPLACE PROCEDURE GETUSER
(
USERGUID OUT NVARCHAR2,
UNAME IN NVARCHAR2
)
IS
------------------------

Can anyone assist?

Thanks in advance!

Tim
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2005
Added on Feb 28 2005
1 comment
726 views