Can you get COUNT and RESULTS at same time?
From: David Diano <dave_at_diano.com>
Date: 1996/08/01
Message-ID: <320156D6.7997_at_diano.com>#1/1
Date: 1996/08/01
Message-ID: <320156D6.7997_at_diano.com>#1/1
To all gurusI
am writing a database application for the web using PLSQL and Oracle. When I do a search, I would like the count of total records found as well as the search results. The ROWCOUNT tells you only the count of rows read so far. The only two approaches I have:
- Do two queries, one with count, the second with results.
- After I display me first 20 records, continue looping through the results cursor until the end and getting the count.
Clearly, both these approaches are not optimal. There SHOULD be a way to do this: some function or hidden variable, but I can't find it.
Please help.
Thanks in advance, David Diano
--Received on Thu Aug 01 1996 - 00:00:00 CEST
************************************************
* Diano Consulting * * http://www.diano.com ** dave_at_diano.com * * "When it has to be right the first time." *
************************************************