|
楼主 |
发表于 2010-10-17 23:59
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
下面是按你的模式套写的
select *,val(iif(借方金额 is null,0,借方金额)) as "借方",val(iif(贷方金额 is null,0,贷方金额)) as "贷方",iif(名称="应交税金" or 名称="其他应付款" or 名称="其他应交款" or 名称="实收资本" or 名称="本年利润" or 名称="应付账款",
val(iif(贷方金额 is null,0,贷方金额)) -
val(iif(借方金额 is null,0,借方金额)),
val(iif(借方金额 is null,0,借方金额)) -
val(iif(贷方金额 is null,0,贷方金额)) )as 余额from
(
select * from [现金$a:i] union all
select * from [银行存款$a:i] union all
select * from [应收帐款$a:i] union all
select * from [其他应收款$a:i] union all
select * from [长期股权投资$a:i] union all
select * from [待摊费用$a:i] union all
select * from [固定资产$a:i] union all
select * from [在建工程$a:i] union all
select * from [其他应交款$a:i] union all
select * from [应交税金$a:i] union all
select * from [其他应付款$a:i] union all
select * from [实收资本$a:i] union all
select * from [本年利润$a:i] union all
select * from [生产成本$a:i] union all
select * from [制造费用$a:i] union all
select * from [主营业务收入$a:i] union all
select * from [主营业务成本$a:i] union all
select * from [管理费用$a:i] union all
select * from [财务费用$a:i] union all
select * from [营业外支出$a:i] union all
select * from [应付账款$a:i])
除了头、尾增加外,其他不动,不知哪里错了? |
-
|