Search Postgresql Archives

Re: UPDATE Syntax Check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux