| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера