Re: How should I do this?

From: Laurent Duperval <lduperval(at)videotron(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How should I do this?
Date: 2002-06-28 00:55:23
Message-ID: afgc5n$gr$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 27 Jun 2002 12:53:21 -0400, Martijn van Oosterhout wrote:

> Have a look at DISTINCT ON. It works well for this sort of thing.
>

Yes, but if I have

1 2 3
2 2 3
3 3 4
4 2 3
5 2 3

I want

1 2 3
3 3 4
4 2 3

left in the database. I think using distint on would yield

1 2 3
3 3 4

only (provided my key isn't part of unique on). But then, I need to read
up a bit more to make sure.

Thanks!

L

--
Laurent Duperval <mailto:lduperval(at)videotron(dot)ca>

"The proof that IBM didn't invent the car is that it has a steering wheel and
an accelerator instead of spurs and ropes, to be compatible with a horse."
-

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2002-06-28 01:22:26 Re: transfer data from oracle to postgres
Previous Message s 2002-06-27 23:22:46 transfer data from oracle to postgres