Re: UPDATE Syntax Check - Mailing list pgsql-general

From Rich Shepard
Subject Re: UPDATE Syntax Check
Date
Msg-id alpine.LNX.2.00.1206121547540.5399@salmo.appl-ecosys.com
Whole thread Raw
In response to Re: UPDATE Syntax Check  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: UPDATE Syntax Check  (David Johnston <polobo@yahoo.com>)
List pgsql-general
On Wed, 13 Jun 2012, Thomas Kellerer wrote:

> UPDATE waterchem
>  SET waterchem.easting = s.easting
>      waterchem.northing = s.northing
> FROM sites AS s
> WHERE waterchem.site = s.name;

Thomas,

   For the record, running this pushed me to the correct syntax:

   UPDATE waterchem
     SET easting = s.easting
         northing = s.northing
   FROM sites AS s
   WHERE waterchem.site = s.name;

   The target does not want the table name repeated; postgres looks for a
column named 'waterchem.easting'.

Regards,

Rich


pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: UPDATE Syntax Check
Next
From: Jeff Davis
Date:
Subject: Re: Reference with inheritance propagate data