- Архив списков рассылки pgsql-novice

Поиск
Список
Период
Сортировка
От Matthew Sleight
Тема
Дата
Msg-id !&!AAAAAAAAAAAYAAAAAAAAAAH5a9EkBUZHk600Og0/ttnCgAAAEAAAAKtl1m1FFrtPj6WemChU4s8BAAAAAA==@encore-international.net
обсуждение исходный текст
Ответы Re:  (Richard Broersma <richard.broersma@gmail.com>)
Список pgsql-novice

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!

 

В списке pgsql-novice по дате отправления:

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: SQL from Linux command line
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Join Scalability