日志归档SQL写法
"select year(pubdate),month(pubdate),count(id) from News Group by year(pubdate),month(pubdate) order by year(pubdate) desc,month(pubdate) desc"
access不支持when case end sql语法 但有iif()函数可以代替
如iif(test=1,'me',iif(test=2,'you','other')
相当于
case test when 1 then 'me' when 2 then 'you' else 'other' end from table