Inline Views be used by Normal cursor
856991May 18 2012 — edited May 20 2012Hi All,
Can anyone of you please let me know if an inline view can be used for a cursor.
I tried using as below, but the cursor is not able to fetch the records.
cursor c1 is
select * from
(select gretest(a, b, c ,d) start_date, least(e,f,g,h) end_date from t1, t2,
where t1.col1= t2.col3
group by a,b,c,d
)
where start_date < end_date
Order by end_date asc
when the cursor is getting opened, it is getting exited as there are no records.
But if i try to run the same query which is written for the cursor i.e
select * from
(select gretest(a, b, c ,d) start_date, least(e,f,g,h) end_date from t1, t2,
where t1.col1= t2.col3
group by a,b,c,d
)
where start_date < end_date
Order by end_date asc
Query is returning rows. But Within Cursor, it is not working
Also, please let me know if we need to use REF cursor for this purpose and if REF cursor allows Bulk fetch ?
Thanks,
Lakshmi