troubleshooting Question

Placing calendar month names instead of int

Avatar of mousemat24
mousemat24 asked on
Microsoft SQL ServerMicrosoft SQL Server 2005SQL
4 Comments2 Solutions203 ViewsLast Modified:
Hi There

I have this SQL

and what I want to do is rather then displaying a int for the month, I like to have the acauly name of the month i.e.

where HTC_Month = 1, put January ... where HTC_Month = 10 put October, all the way to December

And also a sort, where it will sort by Year then month, so the latest year (HTC_Year) will be at the top and then the latest month (HTC_Month) and the top as well.

Hope this makes sense?

Thankyou so much
SELECT     dbo.HTC_HitCounter.HTC_Year, dbo.HTC_HitCounter.HTC_Month, dbo.HTC_HitCounter.HTC_Counter, 
                      dbo.MNU_Menu.MNU_DisplayName, dbo.MNU_Menu.MNU_URL, dbo.MNU_Menu.MNU_Description, dbo.MNU_Menu.MNU_Hidden, 
                      dbo.HTC_HitCounter.HTC_MNU_ID
FROM         dbo.HTC_HitCounter INNER JOIN
                      dbo.MNU_Menu ON dbo.HTC_HitCounter.HTC_MNU_ID = dbo.MNU_Menu.MNU_ID
ASKER CERTIFIED SOLUTION
Dimitris
Senior Solution Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros