Re: DISTINCT ON troubles

Поиск
Список
Период
Сортировка
От Jeremy Smith
Тема Re: DISTINCT ON troubles
Дата
Msg-id FKEOIJEHOIKIOEHCGNCLIENGEDAA.jer@highboard.com
обсуждение исходный текст
Ответ на Re: DISTINCT ON troubles  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: DISTINCT ON troubles  (Brian Knox <laotse@aol.net>)
Re: Date / interval question  (Gnugeek <gnugeek@comcast.net>)
Список pgsql-sql
Thanks Josh,

I'll do that, I just wasn't sure if I was missing something obvious.

Jeremy

-----Original Message-----
From: Josh Berkus [mailto:josh@agliodbs.com]
Sent: Thursday, February 19, 2004 2:29 PM
To: jer@highboard.com; pgsql-sql@postgresql.org
Subject: Re: [SQL] DISTINCT ON troubles


Jeremy,

> Am I just approaching this all wrong and need to create a temporary table
> and draw from that, or is there a way to salvage this query?

Think about using a subquery instead of the DISTINCT ON approach.   I don't
think you can get what you want with DISTINCT ON.

A temporary table is not necessary.


--
-Josh BerkusAglio Database SolutionsSan Francisco





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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: DISTINCT ON troubles
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CHAR(n) always trims trailing spaces in 7.4