Re: How should I do this?

Поиск
Список
Период
Сортировка
От Laurent Duperval
Тема Re: How should I do this?
Дата
Msg-id afhkda$1sjg$1@news.hub.org
обсуждение исходный текст
Ответ на Re: How should I do this?  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
In <20020628121755.A15733@svana.org>, Martijn van Oosterhout wrote:
> Ah right. The problem is that DISTINCT ON requires that the fields be
> distincted on be the same and the first few fields being sorted by. In the
> hypothetical case you could do:
>
> select distinct on (col2) select * from a order by col1;
>
> But that isn't allowed. Maybe you will be a stored procedure or something.

I ended up doing this on the client side because there isn't a way for the
DB to know what I'm trying to do. I also wrote the cleanup stuff on the
client side and everything is working up to specs.

Thanks!

L

--
Laurent Duperval <mailto:laurent.duperval@masq.ca>

Why are there flotation devices under plane seats instead of parachutes?



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

Предыдущее
От: "Tomis³aw Kityñski"
Дата:
Сообщение: Re: Wildcards in GROUP BY?
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: ecpg help