Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to call stored procedures in oracle

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Calling the stored procedure through the pls block

Declare

P_dzno varchar2 (50)

P_vchtype VARCHAR2 (50)

P_productclass VARCHAR2 (50)

P_dptcode VARCHAR2 (50)

Begin

Pendant vchtypeambiguous MP'

Paired product classically loaded 03'

Pawdptcodeambiguous

PRODDATA.product_dz_proc.pd_getdzno (pendant dznorepcmlvchtypepptcode)

DBMS_OUTPUT.put_line (p_dzno)

End

2. Oracle anonymous block executes 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 into flag from dual.

DBMS_OUTPUT.PUT_LINE (productInfo.product_code | |','| | flag)

End loop

End

/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report