数据库

位置:IT落伍者 >> 数据库 >> 浏览文章

asp+access按年,按月统计数据


发布日期:2020年03月17日
 
asp+access按年,按月统计数据

asp教程+access按年按月统计数据
/*
字段d_id(自动编号) d_je(货币型)d_sxrq(日期型)

表数据如下

d_id d_je d_sxrq











想按年按月来统计
如果选择年得到
月份
金额

如果选择年得到
月份
金额


*/

Select Year(D_SXRQ) As Y
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
Sum(IIF(Month(D_SXRQ) = D_JE )) As M
From D_FY
Group By Year(D_SXRQ);

上一篇:简单asp连接access数据库代码

下一篇:SQLSERVER存储过程及调用详解