Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to avoid duplicates here...?

How to avoid duplicates here...?

From: Spare Brain <spare_brain_at_yahoo.com>
Date: Wed, 7 Apr 2004 22:16:25 -0400
Message-ID: <c52c5t$l052@kcweb01.netnews.att.com>


Hi,

I had a problem where I had to limit the rows returned - return only the rows between N and M. I accomplished it using a SQL that looks something like this:

SELECT rownum, emp_name from EMPLOYEE

      WHERE dept = 'hardware'
      group by rownum, emp_name having rownum between 10 and 15

Now, as it so happens, there could be multiple entries for any given employee. I am getting multiple rows for the same employee! Is there a way to introduce a "distinct" on just the emp_name? How else to achieve this? If I use "select distinct rownum, emp_name..." it does not prevent multiple employees from showing up!

Please post your valuable suggestions to the newsgroup.

Thanks!
SB Received on Wed Apr 07 2004 - 21:16:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US