Re: Refining query statement - Mailing list pgsql-general

From Rich Shepard
Subject Re: Refining query statement
Date
Msg-id alpine.LNX.2.20.1901170842150.13573@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: Refining query statement  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Refining query statement  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Refining query statement
Next
From: Rich Shepard
Date:
Subject: Re: Refining query statement