摘要:
---列举指定时间月份DECLARE @date1 VARCHAR(10) , @date2 VARCHAR(10)SET @date1 = '2010-01-01'SET @date2 = '2010-09-01'SELECT CONVERT(VARCHAR(7), CAST(LTRIM(YEAR(@date1)) + '-' + LTRIM(number) + '-01' AS DATETIME), 120)FROM master..spt_valuesWHERE type = 'p' AND number B 阅读全文