Distinct on
| From: | Andrew Poodle | Date: | Mon, 03 Jul 2000 14:18:49 +0000 |
| Subject: | Distinct on | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-826@lists.php.net to get a copy of this message | ||
Lo
I'm using PHP to search a postgres DB, and while everything is going fine, I
had a thought. There are sure to be duplicate parts in the database, and I
don't want these duplicate entries returned. Distinct ON (field) seemed to do
the trick, but there is a small problem. The only column that can be used to
GUARANTEE that all parts returned are identifiable is the "part no" however,
there are some parts that don't have a part no. How can I return these parts
when there may be more than one in a result, I don't want the distinct removing
those parts without a part no.
Hope this makes sense :)
regards
Andrew