I think this is the best way to get the month name when you have the month number
Select DateName( month , DateAdd( month , @MonthNumber , 0 ) - 1 )
Or
Select DateName( month , DateAdd( month , @MonthNumber , -1 ) )
More Related Contents:
- Get top 1 row of each group
- Insert results of a stored procedure into a temporary table
- Referring to a Column Alias in a WHERE Clause
- SET versus SELECT when assigning variables?
- How important is the order of columns in indexes?
- Using the result of an expression (e.g. Function call) in a stored procedure parameter list?
- How to print VARCHAR(MAX) using Print Statement?
- Concatenate values based on ID
- Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one sql statement
- For Nvarchar(Max) I am only getting 4000 characters in TSQL?
- Splitting delimited values in a SQL column into multiple rows
- Is it possible to select sql server data using column ordinal position
- varbinary to string on SQL Server
- How do I group on continuous ranges
- How can a LEFT OUTER JOIN return more records than exist in the left table?
- “select * from table” vs “select colA, colB, etc. from table” interesting behaviour in SQL Server 2005
- Dynamic SQL to generate column names?
- Is it possible to perform multiple updates with a single UPDATE SQL statement?
- Column name or number of supplied values does not match table definition
- Incorrect syntax near the keyword ‘with’…previous statement must be terminated with a semicolon
- SQL Server 2005 ROW_NUMBER() without ORDER BY
- How to split string using delimiter char using T-SQL?
- How to find consecutive rows based on the value of a column?
- Can an INNER JOIN offer better performance than EXISTS
- How to escape square brackets inside square brackets for field name
- How do you copy a record in a SQL table but swap out the unique id of the new row?
- Eliminate and reduce overlapping date ranges
- Cumulative Total in MS Sql server [duplicate]
- Memory effective way to read BLOB data in C#/SQL 2005
- When to use EXCEPT as opposed to NOT EXISTS in Transact SQL?