kittusri
SSC Enthusiast
Points: 156
More actions
July 27, 2011 at 12:41 am
#1358968
groupname/month JAN FEB MARCH APRIL
A 3 10 11 12
A- groupname
3- count
10,11,12 - ???? months ?
need some explanation..
Daniel Bowlin
SSC-Dedicated
Points: 34566
July 27, 2011 at 7:23 am
#1359233
Use a matrix with your months at the top, your groups on the side, and your count as the data.
Jonathan AC Roberts
SSCoach
Points: 18407
July 27, 2011 at 8:16 am
#1359290
SELECT GroupName,
DATENAME(mm,'2000-' + RIGHT('0' + CAST([month] as varchar(13)), 4) + '-01') [month],
[Count]
FROM (SELECT 'A' groupname, 1 [month], 3 [Count] UNION ALL
SELECT 'A', 2, 10 UNION ALL
SELECT 'A', 3, 11 UNION ALL
SELECT 'A', 4, 12) A
Viewing 3 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply