FAQ
Hi,



I'm trying to work out how to make an update query work with a join in
posrgre.



I can write it in normal SQL, but postgre comes up with an error on the
first 'inner join'. The online help (that is not very good) makes it seem
like you do not use the 'inner join' at all, but just aggregate; but then
postgre comes up with an error saying this won't work either.



Any hints would be most helpful.



The code I started with is:



UPDATE public_consumption_hanson_uk_el_clear INNER JOIN
public_consumption_hanson2 ON
(public_consumption_hanson_uk_el_clear.supply_day =
public_consumption_hanson2.supply_day) AND
(public_consumption_hanson_uk_el_clear.supply_band_name =
public_consumption_hanson2.supply_band_name) AND
(public_consumption_hanson_uk_el_clear.meterreference =
public_consumption_hanson2.meter_no) AND
(public_consumption_hanson_uk_el_clear.meterpointreference =
public_consumption_hanson2.mpan) SET
public_consumption_hanson_uk_el_clear.actual_estimate =
Min([consumption_hanson2].[actual_estimate]);



Thanks in advance!

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedJul 12, '10 at 11:38a
activeJul 12, '10 at 4:25p
posts2
users2
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase