作者: ACMAIN_CHM 时间: 2009-11-24 21:56
产量累计-dsum(....) as 产量
******************
* 一切皆有可能 *
******************
. ACMAIN - Access论坛回贴准则(个人).
. 同一贴子不回复第二次 作者: todaynew 时间: 2009-11-25 06:33
select a.*,a.产量累计-(select sum(b.产量累计) from tbname as b where b.日期=a.日期 and b.时间<=a.时间) as 产量 from tbname as a
或者:
select a.*,a.产量累计-dsum("产量累计","tbname","日期=" & [日期] & " and 时间<=" & [时间]) from tbname