熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

asp+access按年,按月統計數據

2022-06-13   來源: .NET編程 

  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);


From:http://tw.wingwit.com/Article/program/net/201311/14430.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.