|
8#
楼主 |
发表于 2006-6-4 05:55:00
|
只看该作者
关键是本年本金还要继续滚入下年计算利息
SELECT Tblylj.[YLJ ID], Tblylj.姓名编码, Tblxmb.姓名, Tblylj.年份, Tblylj.上年社会平均工资, Tblylj.当年缴费月数, Tblylj.个人缴费比例, Tblylj.单位划入比例, Tblylj.年度个人记帐利率, Tblylj.个人年缴费额,
Round(个人年缴费额/个人缴费比例*100,0) AS 当年缴费工资基数,
Round(当年缴费工资基数*单位划入比例/100,2) AS 当年单位划转,
Round(个人年缴费额*年度个人记帐利率/100*1.083*0.5,2) AS 当年个人利息,
Round(当年单位划转*年度个人记帐利率/100*1.083*0.5,2) AS 当年单位利息,
(个人年缴费额+当年个人利息) AS 当年个人本息,
(当年单位划转+当年单位利息) AS 当年单位本息,
(当年个人本息+当年单位本息) AS 当年本息合计, DLast("[本年本金]","本年本金","[YLJ ID] < " & [YLJ ID] & "") AS 上年本金,
Round([上年本金]*[年度个人记帐利率]/100,2)+[当年本息合计] AS 本年本金
FROM Tblxmb INNER JOIN Tblylj ON Tblxmb.[XMB ID]=Tblylj.姓名编码; |
|