以下SQL脚本为我提供了不同总帐帐户的行值。我只想让他们总计给我一个综合价值。
let myObjects: [MyObject] = Array(repeating: 0, count: 10).map { _ in return MyObject() }
答案 0 :(得分:0)
也许这可能会有所帮助。
SELECT glacct_descrip,
Sum (total_balance) * -1
FROM v_glacct_descrip
INNER JOIN v_glacct_current_balance
ON v_glacct_descrip.glacct_id =
v_glacct_current_balance.glacct_id
WHERE v_glacct_descrip.glacct IN ( '495500-215', '495510-215', '495550-215',
'495560-215' )
GROUP BY glacct_descrip;