Re: SQL query

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: SQL query
Дата
Msg-id 20050211133953.GB5110@wolff.to
обсуждение исходный текст
Ответ на SQL query  (David Goodenough <david.goodenough@btconnect.com>)
Ответы Re: SQL query
Список pgsql-general
On Fri, Feb 11, 2005 at 11:07:24 +0000,
  David Goodenough <david.goodenough@btconnect.com> wrote:
>
> I thought of using an inner select for the join, and using limit 1 to
> get just the one, and forcing the order by to give me the billing
> address by preference, but I am then dependant on the sort order
> of the particular type values I am selecting from.

You can order by boolean expressions such as type = 'billing'.
You can use that with LIMIT or DISTINCT ON to get just the address you want.

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

Предыдущее
От: John DeSoi
Дата:
Сообщение: Re: a few doubts regarding postgres
Следующее
От: Terry Lee Tucker
Дата:
Сообщение: Re: a few doubts regarding postgres