Home » SQL & PL/SQL » SQL & PL/SQL » Coping one cursor results into another cursor (oracle 11g)
Coping one cursor results into another cursor [message #644081] Wed, 28 October 2015 01:15 Go to next message
aravind.peddola@gmail.com
Messages: 2
Registered: January 2015
Location: Hyderbad
Junior Member

Hi,
Below is my code.
i have 3 organizations for each organization i am calling PKG_MANAGE_ORGANIZAION_PROFILE.SP_GET_CM_ORG_PROF_PERM_DTLS.
out mode is SYS_REFCURSOR, i want copy all 3 organizations result set into another cursor (results out SYS_REFCURSOR).

How to solve this problem .

Please tell me.
create or replace procedure AK_seaarch_org_names5 (results out SYS_REFCURSOR)  
as  
  
  I_ORGANIZATION_ID NUMBER;  
  I_REQ_SSO_USER_ID VARCHAR2(200);  
  O_ORG_PROF_DTLS SYS_REFCURSOR;  
  O_ORG_PROF_DTLS1 SYS_REFCURSOR;  
   type nt_type is table of number;  
  nt nt_type := nt_type (143,88,141);  
  
  lv_org_number NUMBER;  
BEGIN  
 --   
  I_REQ_SSO_USER_ID := '28c200d0624fe559d381fb0032a7e97c';  
  for i in 1..nt.count loop  
    --dbms_output.put_line(nt(i));  
 I_ORGANIZATION_ID := nt(i);  
  PKG_MANAGE_ORGANIZAION_PROFILE.SP_GET_CM_ORG_PROF_PERM_DTLS(  
    I_ORGANIZATION_ID => I_ORGANIZATION_ID,  
    I_REQ_SSO_USER_ID => I_REQ_SSO_USER_ID,  
    O_ORG_PROF_DTLS => O_ORG_PROF_DTLS  
   );  
   END LOOP;   
  
  
END AK_seaarch_org_names5 ;  
Re: Coping one cursor results into another cursor [message #644082 is a reply to message #644081] Wed, 28 October 2015 01:35 Go to previous message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Create a new procedure that will do the same thing than SP_GET_CM_ORG_PROF_PERM_DTLS but taking an array of values.

Previous Topic: Inclusion of duplicate records
Next Topic: Oracle Stored procedure takes long time to initiate / execute - (from package)
Goto Forum:
  


Current Time: Sun Jul 12 21:42:47 CDT 2026