Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shezad
Starting Member
32 Posts |
Posted - 2010-04-04 : 02:02:29
|
| hi,How can I do this I have one parameter which will give me month numeric value like 12 now I want to print Decfor example SELECT DATENAME(month, getdate()) AS 'Month Name'it will return current month but in place of getdate I want to put 12 any ideaRegardsShezad |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-04 : 02:07:35
|
something like belowDECLARE @month intSET @month=12--your passed valueSELECT DATENAME(mm,DATEADD(mm,@month-1,0)) AS yourMonthNameValue ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
shezad
Starting Member
32 Posts |
Posted - 2010-04-04 : 02:10:15
|
thank you very much |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-04 : 02:14:22
|
| welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|