Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: PL/SQL Help....
Look up REF_CURSOR in PL/SQL docs.
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Bryan Wells
Sent: Tuesday, January 30, 2007 10:35 AM
To: Oracle-L
Subject: PL/SQL Help....
All,
Since my pl/sql is less than stellar, well, way less than that; i was hoping to get some direction on how to pass an array of records back to the calling application? i have initialized a record type, have been able to write and read from it within the pl/sql package but just cant figure out how to pass it out of the package. I have been able to pass an array out as a varchar and clob, but cant get the array to distinguish end of record. Yes I'm a novice ;-)
Here is a snippet of what i have done;
CREATE OR REPLACE PACKAGE BODY pkg_rpt
AS
PROCEDURE PR_RTN_DETAIL(in_s1 IN varchar2,-- start date
in_e1 IN varchar2,-- end date in_s2 IN varchar2,-- start date + release_time/24 in_e2 IN varchar2,-- end date + release_time/24 in_acct IN varchar2, in_subacct IN varchar2, out_array OUT ?)
--
/* Cursors to retrieve records for record type to pass back to
application */
.
.
.
--
/* create record type */
--
TYPE rpt_detail_type IS RECORD
(PHN table.phone%TYPE, FIRST table.first%TYPE, ACCT table.acct%TYPE, TRANID table.transaction%TYPE, DT date, STATUS varchar2(1 BYTE), INTCODE0 table.intcode0%TYPE, ID table.id%type);
v_br rpt_detail_type;
--
.
.
.
--
/* populate records here */
Thanks All! As usual your expertise is much appreciated!
-- Bryan S Wells DBA VoiceLog Email: bunjibry_at_gmail.com -- http://www.freelists.org/webpage/oracle-lReceived on Tue Jan 30 2007 - 09:45:52 CST
![]() |
![]() |