Record Count + Resultset
dbdanAug 17 2009 — edited Aug 17 2009Hi 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