Exforsys

Online Training

ref cursor insert

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 ...


Go Back   Exforsys > Database > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-20-2008, 12:51 PM
Junior Member
 
Join Date: Aug 2007
Posts: 1
oracle_coorgi is on a distinguished road
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;
/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools

Posting Rules
You may not post new questions
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:53 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.