Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to test procedure that has OUT params in SQLPlus?
ohaya wrote:
> Hi,
>
> I have created a procedure called decrypt_inmemory with following
> parameters:
>
> key IN varchar2, data IN varchar2, cleardata OUT varchar2
>
> I was wondering how I can test execute this procedure from within
> SQLPlus?
>
> How do I create a variable to receive the OUT parameter? And, how do I
> display this variable after I test-execute the procedure?
>
> Thanks,
> Jim
In addition to the SQL*Plus methods others have posted you can always wrap a stored procedure in a function.
CREATE OR REPLACE FUNCTION test_proc (key_string IN varchar2, encrypted_string IN varchar2) RETURN VARCHAR2 AS
BEGIN
decrypt_password_inmemory(key_string, encrypted_string, decrypted);
RETURN decrypted;
END test_proc;
/
SELECT test_proc(val1, val2) FROM dual;
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Tue Jun 21 2005 - 12:12:24 CDT
![]() |
![]() |