select convert(varchar(7),dateadd(month,number,'2010-01-01'),120) AS MONTH
from master..spt_values
where type='P' and dateadd(month,number,'2010-01-01')<='2010-09-01'

posted on 2015-12-23 13:54  程序员丁先生  阅读(612)  评论(0编辑  收藏  举报