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

Home -> Community -> Usenet -> c.d.o.misc -> Partial distinct - how?

Partial distinct - how?

From: Anneke Treep <anneke_at_echelon.nl>
Date: Thu, 23 Sep 1999 10:27:41 +0200
Message-ID: <37E9E47D.7D543603@echelon.nl>


Hi all,

I have a DB with "persons" that can belong to one or more "dept"s. I need to list each person only once, under one the "dept"s he belongs to. It doesn't matter which one.

So I would like to do something like:

SELECT DISTINCT(person.id), workplaces.dept
       ^^^^^^^^^^^^^^^^^^^

FROM person, workplaces
WHERE person.id = workplaces.id
ORDER BY workplaces.dept

How to do this???

Thanks in advance,

Anneke Treep Received on Thu Sep 23 1999 - 03:27:41 CDT

Original text of this message

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