Re: Refining query statement

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Refining query statement
Дата
Msg-id alpine.LNX.2.20.1901170933430.18965@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Refining query statement  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Thu, 17 Jan 2019, Adrian Klaver wrote:

> To be clear the next-activity date = next_contact in the database, correct?

Adrian,

   Yes. I've renamed the Activities table to Contacts and the Contacts table
to People.

> NULL basically means unknown, so having it stand for something is a bit of
> a stretch. Seems to me a boolean field of name active to denote contacts
> you need to keep up with is in order. Then make the next_contact field NOT
> NULL and replace the current NULL values with 'infinity':

   This makes good sense.

> As to current situation:
>
> 1) Use my previous suggestion.

   I did so, but will modify it as you suggest:
> 2) WHERE COALESCE(next_contact, 'infinity') BETWEEN '01/01/2019'::date AND 
> 'today'::date

Thanks again,

Rich


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Refining query statement
Следующее
От: Rich Shepard
Дата:
Сообщение: Re: Refining query statement