凭证提交报错
金蝶云社区-财务老司机
财务老司机
0人赞赏了该文章 475次浏览 未经作者许可,禁止转载编辑于2018年12月15日 12:32:09
Sql execute exception : select t.faccountid, t.fassistgrpid,
sum(t.origAmount) origAmount, sum(t.localAmount) localAmount
from (
select b.faccountid, b.fassistgrpid,
case when b.fperiod = ? then b.fendbalancefor else (b.fdebitfor - b.fcreditfor) end origAmount,
case when b.fperiod = ? then b.fendbalancelocal else (b.fdebitlocal - b.fcreditlocal) end localAmount
from t_gl_assistbalance b
where b.forgunitid = ? and b.fcurrencyid = ? and b.fperiod >= ? and b.fperiod <=? and ( (b.faccountid = ? and b.fassistgrpid in (?)) )
union all
select log.faccountid, log.fassistgrpid,
isnull(log.fdebitfor,0) - isnull(log.fcreditfor,0) origAmount,
isnull(log.fdebitlocal,0) - isnull(log.fcreditlocal,0) localAmount
from t_gl_voucherlog log
inner join t_bd_period pd on pd.fid = log.fperiodid
where log.fcompanyid = ? and (log.fisupdating = 0 or log.fisupdating = 1) and log.fcurrencyid = ? and pd.fnumber >= ? and pd.fnumber <= ? and log.fbaltype = ? and log.fisassist = 1 and ( (log.faccountid = ? and log.fassistgrpid in (?)) )
) t
group by t.faccountid, t.fassistgrpid
Caused exception message is: 列名 'fperiod' 无效。