Re: Refining query statement

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Refining query statement
Date: 2019-01-17 16:46:54
Message-ID: alpine.LNX.2.20.1901170842150.13573@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 17 Jan 2019, David G. Johnston wrote:

> Why is next_contact allowed to be null?

David,

There are a number of reasons. The prospect might have retired, told me to
pound sand, or has put off a decision.

> Your concept of "most current row" is strictly based upon next_contact so
> if next_contact is null it is impossible to know whether it is the most
> current row (consider that two activities could be missing the
> next_contact date - which of those is the most current?)

That's quite true. I realize I've been asking the question incorrectly.

What I want is a list of contacts to make today. This includes ones that
should have been made earlier but weren't and excludes earlier contacts that
have no scheduled next contact (therefore, the nulls.).

Does this clarify what I'm asking of the data?

Thanks,

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2019-01-17 16:50:01 Re: Refining query statement
Previous Message Adrian Klaver 2019-01-17 16:41:26 Re: Refining query statement