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

SF.net SVN: ledger-smb:[5789] trunk/sql/Pg-database.sql



Revision: 5789
          http://sourceforge.net/p/ledger-smb/code/5789
Author:   einhverfr
Date:     2013-05-14 13:28:53 +0000 (Tue, 14 May 2013)
Log Message:
-----------
correcting db load errors for PostgreSQL 8.4 and 9.0 regarding group by of non-key fields when a pkey is grouped by

Modified Paths:
--------------
    trunk/sql/Pg-database.sql

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2013-05-14 08:30:50 UTC (rev 5788)
+++ trunk/sql/Pg-database.sql	2013-05-14 13:28:53 UTC (rev 5789)
@@ -4776,7 +4776,7 @@
   FROM ar gl
   JOIN acc_trans ac ON ac.trans_id = gl.id
   JOIN account_link al ON ac.chart_id = al.account_id and al.description = 'AR'
- GROUP BY gl.id, gl.amount, ac.transdate
+ GROUP BY gl.id, gl.amount, ac.transdate, gl.transdate
 UNION ALL
 SELECT id, CASE WHEN gl.amount = 0 THEN 0
                 WHEN gl.transdate = ac.transdate
@@ -4787,7 +4787,7 @@
   FROM ap gl
   JOIN acc_trans ac ON ac.trans_id = gl.id
   JOIN account_link al ON ac.chart_id = al.account_id and al.description = 'AP'
- GROUP BY gl.id, gl.amount, ac.transdate;
+ GROUP BY gl.id, gl.amount, ac.transdate, gl.transdate;
 
 COMMENT ON VIEW cash_impact IS
 $$ This view is used by cash basis reports to determine the fraction of a

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.