I write following select query and it work find , and given out put.
Select custname,contactno, enc_dec.decrypt(creditcardno,password) as
creditcardno ,enc_dec.decrypt(income,password) as
income from employees where custid=5;
Now I need to need to write procedure to this nameas 'retrieve_decrypt(5)' . I write procedure like this, it complied but when calling it not print result and given error.
CREATE OR REPLACE PROCEDURE retrieve_decrypt(
custid in NUMBER,
decrypt_value out sys_refcursor
)
IS
BEGIN
open decrypt_value for Select custname,contactno, enc_dec.decrypt(creditcardno,password) as
creditcardno ,enc_dec.decrypt(income,password) as
income from employees where custid=custid ;
COMMIT;
END;
/
I called it like this SELECT retrieve_decrypt(5) FROM DUAL;
.
need some expert help to resolve this. As this issue, I am struggle in lot of time.