RE: how to pass a resultset out of a store procedure
Date: Mon, 19 Feb 2001 09:31:44 -0500
Message-ID: <3AE107C8_at_MailAndNews.com>
I have used a ref cursor in a PL/SQL block as an example:
variable myref ref_cursor
..
..
BEGIN
...
IF mycondition THEN
OPEN :myref FOR SELECT a ,b ,c FROM mytablea; ELSE OPEN :myref FOR SELECT a ,b ,c FROM mytableb;
END IF;
END;
/
print myref
Regards,
David.
>===== Original Message From "Scott Kerr" <scott.alba_at_verizon.net> =====
>Hi,
>
>In the package body, how would one use the defined REF Cursor?
>
>Would it be somthing like..
>lo_CursorSet := Select * from table;
>
>Scott
>
>
>
>
>
>"M Hashim" <mhashim_ca_at_passport.ca> wrote in message
>news:3A8A07F1.AA68541C_at_passport.ca...
>> Put it in a package
>>
>> TYPE OutParm??? IS REF CURSOR;
>>
>> CREATE OR REPLACE PACKAGE BODY ReturningCursorDataSet AS
>> TYPE OutParmCursorType IS REF CURSOR;
>> PROCEDURE ProcReturningCursorDataSet( o_CursorSet OUT
OutParmCursorType)
>> AS
>> etc....
>>
>> OR
>> return it from a function.....
>>
>>
>>
>> Surti wrote:
>>
>> > If i want to write a statement "select * from abc" (which returns
multiple
>> > records with multiple fields) then how can i pass this resultset to me
front
>> > end. the output parameters won't work here as I need to pass out
multiple
>> > records
>> >
>> > Any help will be appreciated
>>
>
Get your FREE web-based e-mail and newsgroup access at:
http://MailAndNews.com
Create a new mailbox, or access your existing IMAP4 or POP3 mailbox from anywhere with just a web browser.
Received on Mon Feb 19 2001 - 15:31:44 CET