Re: Select Question

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Select Question
Дата
Msg-id 20040202190638.GA8386@svana.org
обсуждение исходный текст
Ответ на Select Question  (Alex <alex@meerkatsoft.com>)
Ответы Re: Select Question  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
Список pgsql-general
See DISTINCT ON()

On Tue, Feb 03, 2004 at 12:22:29AM +0900, Alex wrote:
> Hi,
> I need to remove duplicate records from a table like
>
> Code         Date
> XS111111     2004-01-26
> XS111111     2003-01-22
> XS222222     2004-02-01
> XS222222     2004-01-26
> XS222222     2003-01-22
>
> where only the newest record of Code XSxxxxxxx is kept in the table. Is
> there an easy way to do that?

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> (... have gone from d-i being barely usable even by its developers
> anywhere, to being about 20% done. Sweet. And the last 80% usually takes
> 20% of the time, too, right?) -- Anthony Towns, debian-devel-announce

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Return Value of a Function
Следующее
От: Terry Lee Tucker
Дата:
Сообщение: Re: Return Value of a Function