From: Moritz Bunkus Date: Wed, 22 Jul 2009 08:17:00 +0000 (+0200) Subject: Neuere PostgreSQL-Versionen unterstützen das Aliasen von zu aktualisierenden Tabellen... X-Git-Tag: release-2.6.1beta1~352 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=600b274884a8a85d12ddf284cbfcae5620246fc4;p=kivitendo-erp.git Neuere PostgreSQL-Versionen unterstützen das Aliasen von zu aktualisierenden Tabellen nicht. --- diff --git a/sql/Pg-upgrade2/update_date_paid.sql b/sql/Pg-upgrade2/update_date_paid.sql index 30b251f06..9a8b2fd94 100644 --- a/sql/Pg-upgrade2/update_date_paid.sql +++ b/sql/Pg-upgrade2/update_date_paid.sql @@ -1,5 +1,5 @@ -- @tag: update_date_paid -- @description: Aktualisieren des Zahldatums in der Datenbank bei Kreditoren- und Debitorenbuchungen, wo die Funktion "Zahlung buchen" verwendet wurde -- @depends: release_2_6_0 -UPDATE ap a SET datepaid = (SELECT max(ac.transdate) FROM acc_trans ac LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE ac.trans_id=a.id AND c.link LIKE '%paid%') WHERE paid > 0 AND datepaid IS null AND NOT invoice; -UPDATE ar a SET datepaid = (SELECT max(ac.transdate) FROM acc_trans ac LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE ac.trans_id=a.id AND c.link LIKE '%paid%') WHERE paid > 0 AND datepaid IS null AND NOT invoice; +UPDATE ap SET datepaid = (SELECT max(ac.transdate) FROM acc_trans ac LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE ac.trans_id = ap.id AND c.link LIKE '%paid%') WHERE paid > 0 AND datepaid IS null AND NOT invoice; +UPDATE ar SET datepaid = (SELECT max(ac.transdate) FROM acc_trans ac LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE ac.trans_id = ar.id AND c.link LIKE '%paid%') WHERE paid > 0 AND datepaid IS null AND NOT invoice;