create or replace package XXX_MWA_LOV_TEST AS
TYPE t_ref_csr IS REF CURSOR;
PROCEDURE XXX_USERS_LOV (p_user_name IN VARCHAR2,x_users OUT NOCOPY t_ref_csr);
end XXX_MWA_LOV_TEST;
如何XXX_USERS_LOV
在 SQL*Plus 中运行程序?
我尝试了这段代码,但得到了语法错误:
SQL> EXECUTE XXX_MWA_LOV_TEST.XXX_USERS_LOV('%',:my_p_out);
程序主体:
create or replace package body XXX_MWA_LOV_TEST AS
PROCEDURE XXX_USERS_LOV (x_users OUT NOCOPY t_ref_csr,p_user_name IN VARCHAR2) IS
BEGIN
OPEN x_users FOR select user_id,user_name,description
from fnd_user
where user_name like p_user_name;
DBMS_OUTPUT.PUT_LINE('TESTING DATA');
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR IN USER LOV '|| SQLERRM);
END XXX_USERS_LOV;
end XXX_MWA_LOV_TEST;