以下是引用在2007-8-28 17:55:14的发言:
SumAllCount=Conn.exeCute("select sum(gg) from mm ")(0)
SumYearCount=Conn.exeCute("select sum(gg) from mm where year(tt)='"&year(date())&"'")(0)
SumMonthCount=Conn.exeCute("select sum(gg) from mm where year(tt)='"&year(date())&"' and month(tt)='"&month(date())&"'")(0)
天涯听雨 的代码没错,是本人搞错了,现在已纠正.
鸣谢:天涯听雨
要总计本季度,上一季度和上一月份,要怎样总计呢?