home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / oracle / 1434 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.1 KB  |  32 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!gumby!destroyer!fmsrl7!ef2007!wwm
  3. From: wwm@ef2007.efhd.ford.com (William Meahan)
  4. Subject: SQL*plus -- limiting maximum number of returned rows?
  5. Message-ID: <BtuK40.8By@ef2007.efhd.ford.com>
  6. Organization: EFHD Ford Motor Company
  7. Date: Mon, 31 Aug 1992 12:02:24 GMT
  8. Lines: 22
  9.  
  10. In SQL*Plus (not embedded SQL!) is there any way of limiting the number
  11. of rows returned by a query?
  12.  
  13. I am working on a report that is supposed to find the "top 5" items in 
  14. a catagory.  The query returns 0 or more rows based on the selection
  15. criteria, sorted in the appropriate order.  Some queries return a dozen
  16. or more rows, but I'm only interested in the first 5.
  17.  
  18. If I were using embedded SQL in a C program (or a perl script using 
  19. oraperl) the solution would be trivial.  For internal reasons, however,
  20. I'm stuck with using SQL*Plus.
  21.  
  22. Any ideas?
  23.  
  24.  
  25. --
  26. Bill Meahan
  27. -- 
  28. Bill Meahan            |EFHD Information Systems Staff
  29. Technical Consultant        |Ford Motor Company
  30. wwm@ef2007.efhd.ford.com          | +1 313 487 6122
  31. ...!fmsrl7!ef2007!wwm           |I'm not paid to speak for Ford!
  32.