From e2e1fd6f043380299d0703068e77ca624fb4a238 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 24 Sep 2018 00:07:31 -0400 Subject: [PATCH] include in deploy --- db_deploy.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db_deploy.sql b/db_deploy.sql index 8c61b10..3ed4968 100644 --- a/db_deploy.sql +++ b/db_deploy.sql @@ -204,9 +204,9 @@ CREATE OR REPLACE FUNCTION evt.gl_insert() RETURNS trigger ) ,list AS ( SELECT - acct - ,least(min(lower(dur)),min(lower(g.dur))) minp - ,greatest(max(lower(dur)),max(lower(g.dur))) maxp + b.acct + ,least(min(lower(f.dur)),min(lower(g.dur))) minp + ,greatest(max(lower(f.dur)),max(lower(g.dur))) maxp FROM ins b INNER JOIN evt.fspr f ON @@ -214,9 +214,9 @@ CREATE OR REPLACE FUNCTION evt.gl_insert() RETURNS trigger LEFT OUTER JOIN evt.bal e ON e.acct = b.acct LEFT OUTER JOIN evt.fspr g ON - g.fspr = e.id + e.fspr = g.id GROUP BY - acct + b.acct ) ,seq AS ( WITH RECURSIVE rf (acct, minp, maxp, id, dur, obal, debits, credits, cbal) AS