Home » Other » Client Tools » REF CURSOR in SELECT Statement?- URGENT
REF CURSOR in SELECT Statement?- URGENT [message #38557] Fri, 26 April 2002 10:16 Go to next message
UmaSund
Messages: 22
Registered: February 2002
Junior Member
Hi

1. Can i call a Ref Cursor function in a select statement?
2. If Yes, Can some one give me an example.

This is real urgent.

Thanks in advance.

-Umasund
Re: REF CURSOR in SELECT Statement?- URGENT [message #38625 is a reply to message #38557] Wed, 01 May 2002 07:15 Go to previous message
oraboy
Messages: 97
Registered: October 2001
Member
Create or replace package test1 as
type resultset is ref cursor;
function test1 return resultset;
end;

Create or replace package body test1 as
function test1 return resultset is
lv_res resultset;
begin
open lv_res for 'Select userid,lname from ll_user_master';
return(lv_res);
end;
end;

select test1.test1 from dual;
TEST1
--------------------
CURSOR STATEMENT : 1

CURSOR STATEMENT : 1

USERID lname
------------------------------ ---------
m m
vsampath vsa441
vjoshi vjoshi
vkrishnamoorthy krish
sgill01 mtcat
kkipila kki318
tpiccirilli tpicc

Regards
Oraboy
Previous Topic: Random value within a range
Next Topic: URGENT - Error while executing package procedure
Goto Forum:
  


Current Time: Fri Mar 29 01:02:52 CDT 2024