Returning Month Name in SQL Server Query

后端 未结 11 967
情深已故
情深已故 2020-12-13 03:39

Using SQL Server 2008, I have a query that is used to create a view and I\'m trying to display a month\'s name instead of an integer.

11条回答
  •  时光说笑
    2020-12-13 03:43

    DECLARE @iMonth INT=12
    SELECT CHOOSE(@iMonth,'JANUARY','FEBRUARY','MARCH','APRIL','MAY','JUNE','JULY','AUGUST','SEPTEMBER','OCTOBER','NOVEMBER','DECEMBER')
    

提交回复
热议问题