Re: Subquery to select max(date) value - Mailing list pgsql-general

From David G. Johnston
Subject Re: Subquery to select max(date) value
Date
Msg-id CAKFQuwaW3oivY=6smmsBgF5-9qy-UC78WkOcxuyrYZd+bTgg5g@mail.gmail.com
Whole thread Raw
In response to Subquery to select max(date) value  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Subquery to select max(date) value [RESOLVED]
List pgsql-general
On Tue, Feb 12, 2019 at 3:24 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:
> psql:next_contact_date.sql:7: ERROR:  syntax error at or near "select"
> LINE 4:       A.next_contact = select (max(A.next_contact) from A)
>                                 ^
> and I fail to see what I've done incorrectly.

You put the open parenthesis after the word select instead of before.

A.next_contact = (SELECT max(A.next_contact) FROM A)

David J.


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Subquery to select max(date) value
Next
From: Rich Shepard
Date:
Subject: Re: Subquery to select max(date) value [RESOLVED]