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
Hi,
Here's the actual procedure:
CREATE or REPLACE PROCEDURE decrypt_password_inmemory (key_string IN varchar2, encrypted_string IN varchar2, decrypted OUT varchar2) IS
encrypted_raw RAW(128) := UTL_RAW.CAST_TO_RAW(encrypted_string); key_raw RAW(128) := UTL_RAW.CAST_TO_RAW(key_string);
decrypted_raw RAW(128);
decrypted_string VARCHAR2(2048);
BEGIN
dbms_obfuscation_toolkit.DESDecrypt( input => encrypted_raw, key => key_raw, decrypted_data => decrypted_raw); dbms_output.put_line('Decrypted Password is: ' || decrypted_string);END;
Here's what I get when I try to execute it in SQLPlus:
SQL> /
end;
*
ERROR at line 5:
ORA-06550: line 5, column 1: PLS-00103: Encountered the symbol "END" when expecting one of the following:
Jim Received on Tue Jun 21 2005 - 09:27:53 CDT