一、通过pls块来调用存储过程;
declare
p_dzno varchar2(50);
p_vchtype VARCHAR2(50);
p_productclass VARCHAR2(50);
p_dptcode VARCHAR2(50);
begin
p_vchtype:='MP';
p_productclass:='03';
p_dptcode:='206';
PRODDATA.product_dz_proc.pd_getdzno(p_dzno,p_vchtype,p_productclass,p_dptcode);
DBMS_OUTPUT.put_line(p_dzno);
end;
二、oracle 匿名块执行sql
declare
CURSOR flag_cur IS select lp.product_code from lxg_product lp;
productInfo flag_cur%ROWTYPE;
flag char(1);
begin
for productInfo in flag_cur loop
select decode(
(select count(g.product_code)
from ahs_policy_product g
where g.product_code=productInfo.product_code
and g.updated_date > date '2015-07-01'
and g.created_by not in ('BIS', 'PTP', 'pacard', 'admin')
and g.created_by not in (select t.um_code from t_ptp_agent_account_info t)
and rownum = 1),0,'N','Y') into flag from dual;
DBMS_OUTPUT.PUT_LINE(productInfo.product_code ||','|| flag);
end loop;
end;
/
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。