Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Record Count + Resultset

dbdanAug 17 2009 — edited Aug 17 2009
Hi All,

I am executing a query in back and returning ref cursor to front end. Before returning recordset, I am doing record count. If record count is more then max record count defined, then I do not return any recordset.

Now the problem is that I have to execute this query twice, once for counting and another for fetching. This increases my response time. I tried to get Cursor%ROWCOUNT after fetching, so that I can get total time during fetch itself, but it shows 1 as it always fetch single record at time.

Is there any way through which I can execute query once and get records as well as its count.

Thanks,
Danish
This post has been answered by 548849 on Aug 17 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2009
Added on Aug 17 2009
9 comments
2,353 views