SQL根据指定月份获取当前季度
declare @dt datetime
set @dt = cast('2007-05-01' as datetime)
select datename(yy,@dt) + '-' + right('0'+cast(3 * (datepart(qq,@dt)-1) + 1 as varchar),2) + '月'
union
select datename(yy,@dt) + '年' + right('0'+cast(3 * (datepart(qq,@dt)-1) + 2 as varchar),2) + '月'
union
select datename(yy,@dt) + '年' + right('0'+cast(3 * (datepart(qq,@dt)-1) + 3 as varchar),2) + '月'