Returning Oracle Output Parameters from Stored Procedures
439241Feb 28 2005 — edited Feb 28 2005Hi,
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