发布网友 发布时间:2022-04-30 07:36
共7个回答
懂视网 时间:2022-04-30 11:57
bd_accid.accidcode, bd_accid.accidname, -- fts_voucher_b.interestdate, -- fts_voucher_b.summary, --fts_voucher_b.debitamount, -- fts_voucher_b.creditamount, sum(fts_voucher_b.creditamount)年归集 from fts_voucher_b, bd_accid where fts_voucher_b.dr = ‘0‘ and fts_voucher_b.pk_corp = ‘1162‘ and fts_voucher_b.pk_account = bd_accid.pk_accid -- and bd_accid.accidcode = ‘011501‘ --公司 and fts_voucher_b.creditamount <> 0 and substr(fts_voucher_b.interestdate, 1, 4) = ‘2014‘ --年份 and fts_voucher_b.pk_ass not in (select freevalueid from gl_freevalue where valuecode = ‘777777‘) group by bd_accid.accidcode, bd_accid.accidname order by bd_accid.accidcode各公司年资金归集汇总sql
标签:
热心网友 时间:2022-04-30 09:05
各公司的表是不同的名称,没有规律是吧?热心网友 时间:2022-04-30 10:23
select 年,sum(期初数) '期初数' from热心网友 时间:2022-04-30 11:58
CREATE OR REPLACE PROCEDURE SUM_INPUT热心网友 时间:2022-04-30 13:49
SELECT 年份,COMM FROM (SELECT 年份,SUM(期初数) COMM WHERE TAB1) T1,热心网友 时间:2022-04-30 15:57
SELECT 年份,SUM(期初数) FROM 表 GROUP BY 年份热心网友 时间:2022-04-30 18:22
group by 就行