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 1h9sHS-0006IK-0j for pgsql-general@arkaria.postgresql.org; Fri, 29 Mar 2019 14:14:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h9sHQ-0003A3-FT for pgsql-general@arkaria.postgresql.org; Fri, 29 Mar 2019 14:14:48 +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 1h9sHQ-00039t-5x for pgsql-general@lists.postgresql.org; Fri, 29 Mar 2019 14:14:48 +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 1h9sHM-0000Op-UM for pgsql-general@lists.postgresql.org; Fri, 29 Mar 2019 14:14:47 +0000 Received: from salmo.appl-ecosys.com (salmo.appl-ecosys.com [192.168.55.1]) by mail.appl-ecosys.com (Postfix) with ESMTP id F0DFD9936E for ; Fri, 29 Mar 2019 07:14:42 -0700 (PDT) Date: Fri, 29 Mar 2019 07:14:42 -0700 (PDT) From: Rich Shepard To: "pgsql-generallists.postgresql.org" Subject: Re: Subquery to select max(date) value In-Reply-To: Message-ID: References: <2780074d-3b87-b154-8bc6-a0f898fbdde2@openvistas.net> <8b99480a-7711-694e-a1c5-ae65bb0c0364@aklaver.com> <87va1oplgl.fsf@news-spur.riddles.org.uk> <878syglqvp.fsf@news-spur.riddles.org.uk> <874l94lo43.fsf@news-spur.riddles.org.uk> 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, 28 Mar 2019, Ken Tanzer wrote: > Really? Is your next_contact field a date field and not a text field? What > order does it come out in? > > (And I assume you saw David J's correction to the misinformation I offered.) Ken, Mea culpa. the next_contact column is a date, I did apply David's correction, and I had a couple of mistaken dates (I had entered 2018 rather than 2019; the middleware code will check for this error and have the user correct entries other than the current year). Regards, Rich