This is a discussion on ref cursor insert within the Oracle Database forums, part of the Database category; hi where iam going wrong CREATE OR REPLACE package insertall as type allins is ref cursor; type ct is ref ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
ref cursor insert
hi
where iam going wrong CREATE OR REPLACE package insertall as type allins is ref cursor; type ct is ref cursor; create or replace procedure asp ( spi OUT insertall.allins, v_trs date, v_tp ca.tp%type, cot OUT insertall.ct, v_end_dt date ); as v_count number; begin open spi for select pk_sid from sales; select count(1) into v_count from ca where tp=v_tp if If v_count = 0 Then insert into ca_temp ( ca_id,ca_nm, ) select ca_id, temp_nam from cccc End If; commit; while (v_trs < v_end_dt) loop if v_tp=1 then insert into bill (sp,type,amt) select tttsp,type,tttamt from ttt where .......... commit; end if; if v_tp=2 then insert into bill2 (sp,type,amt) select tttsp,type,tttamt from ttt where .......... commit; endloop end if; if v_tp=1 then open cot for select ct from tot_val end if; ElsIf i_volt_tp_id = 2 Then open o_db_cur for select ct from tot_val end if; end asp; / |