Limiting Record Recovery to =< 10

From: Doug Stand <dougstand_at_aol.com>
Date: 1996/06/14
Message-ID: <4ptaav$scu_at_newsbf02.news.aol.com>#1/1


How do you set up a limit counter for row retrieval in SQL, without PL? I want to recover any number of rows, up to 10, of various data inputs done by a group of about 100+ people, each individual given a unique indexed USER_ID. I have no problem getting all of their row entries, even with the other constraint that I only want records joined to tables that have certain column values that aren t null. If I had the tools of other programming languages, I d just embed the query inside a counter-loop that would increment up until 10 records for each USER_ID were returned, or the index was completely searched, resulting in some number of rows less than 10. SQL, at least with my tools for Oracle, doesn t seem to have this counter-loop power. The tool I have uses the ROWNUM as a kind of global limit recovery, so 10<ROWNUM per each USER_ID doesn t seem easily available or useful. I'm uncertain about the approach in pure SQL. Anyone? Received on Fri Jun 14 1996 - 00:00:00 CEST

Original text of this message