将运行余额报表合并为一列

时间:2014-02-22 15:13:02

标签: sql ms-access

我有两个选择语句从1个表中收集数据,一个是总计select语句。任何人都可以协助我将它们合并为一个陈述吗?任何帮助表示赞赏

声明1

SELECT ClientId, ExternalBank, PlacementDate
FROM tblDepositTransactions where ID = 15

声明2

SELECT Sum(EffectiveAmount) AS RunningBalance
FROM tblDepositTransactions WHERE ID = 15 GROUP BY ID

1 个答案:

答案 0 :(得分:1)

SELECT ClientId, ExternalBank, PlacementDate,(SELECT Sum(EffectiveAmount)
FROM tblDepositTransactions WHERE ID = 15 GROUP BY ID)as RunningBalance
FROM tblDepositTransactions where ID = 15