Re: Simple SQL question.

From: Gary Mercuri <gnm1_at_encon.pge.com>
Date: 29 Jun 93 00:11:43 GMT
Message-ID: <486_at_ecsa01.encon.pge.com>


Try the following script as a formula:

SQL> l
  1 select last_name from employee emp
  2 where 5 > (select count(*) from employee where last_name < emp.last_name)   3* order by last_name

Best Wishes,

Gary Mercuri


Chris G. vanHasselt (chrisvh_at_med.unc.edu) wrote:
: My question has either a real simple solution or it can't be done! Is
: there a way, without creating some sort of dummy field, to write a SQL
: query so that instead of returning all records satisfying a where clause,
: it returns only the first 5 records satisfying that clause.
 

: Is there an easy way to do this?

: Please reply to chrisvh_at_med.unc.edu
 

: Thanks in advance
: Chris van Hasselt
 

: chrisvh_at_med.unc.edu
Received on Tue Jun 29 1993 - 02:11:43 CEST

Original text of this message