On Tue, 12 Jun 2012, David Johnston wrote:
And, to be thorough, you need to put commas between each field you want to
update.
Did that. Didn't write it that way in the message.
Regards,
Rich
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your sub
On Jun 12, 2012, at 18:50, Rich Shepard wrote:
> 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 push
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.e
On Wed, 13 Jun 2012, Thomas Kellerer wrote:
No it's not quite correct:
UPDATE waterchem
SET waterchem.easting = s.easting
waterchem.northing = s.northing
FROM sites AS s
WHERE waterchem.site = s.name;
Thomas,
I wondered about this syntax, and doing each column separately.
Thanks for
Rich Shepard wrote on 13.06.2012 00:17:
One table, waterchem, with primary key 'site' has columns easting and
northing with no values in them. A second table, sites, with primary key
'name' has values for easting and northing for each row. I want to update
waterchem with the easting and northi
One table, waterchem, with primary key 'site' has columns easting and
northing with no values in them. A second table, sites, with primary key
'name' has values for easting and northing for each row. I want to update
waterchem with the easting and northing values from sites. My proposed
statemen