Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkArn-0004Zk-EH for pgsql-general@arkaria.postgresql.org; Thu, 17 Jan 2019 16:50:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gkArm-0000rb-4A for pgsql-general@arkaria.postgresql.org; Thu, 17 Jan 2019 16:50:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkArl-0000rU-SM for pgsql-general@lists.postgresql.org; Thu, 17 Jan 2019 16:50:05 +0000 Received: from mail.appl-ecosys.com ([50.126.108.78]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gkArj-0003kQ-PV for pgsql-general@lists.postgresql.org; Thu, 17 Jan 2019 16:50:05 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id 6CCCD99353 for ; Thu, 17 Jan 2019 08:50:01 -0800 (PST) Date: Thu, 17 Jan 2019 08:50:01 -0800 (PST) From: Rich Shepard To: pgsql-general@lists.postgresql.org Subject: Re: Refining query statement In-Reply-To: <68ed1eaa-7a03-fbaf-26e2-a1979b636174@aklaver.com> Message-ID: References: <9a5976c8-76da-f06d-9840-5dcf8723e38b@gmx.net> <68ed1eaa-7a03-fbaf-26e2-a1979b636174@aklaver.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, 17 Jan 2019, Adrian Klaver wrote: > Got to thinking more and realized the answer depends on what you want the > query to produce. Can you let us know what is you are trying to pull out > with the query? Adrian, Certainly. Over breakfast I realized the same thing: the existing SELECT query is not asking for the correct data. As I replied in response to David's message, 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.). Thanks, Rich