第1个回答 2010-01-15
For I = 1 TO 12
txtSQL = "Select * From 数据表名 Order BY 日期 Desc"
RS.Open txtSQL,1,2
IF DatePart("m",RS!日期) = I Then
'显示查询结果,根据你的需要设置,例如:
Text1(I - 1).Text = RS!日期
End If
RS.Close
Next I
第2个回答 2010-01-15
select * from
表 a
inner join
(
select month(天) 月,max(天) 天
from 表
where
year(天)=2009
group by
month(天)
) b
on
a.天 = b.天
第3个回答 2010-01-15
select month(date) 月,max(date) from biao where year(date)=2009 group by month(date)