table display

  • groupname/month JAN FEB MARCH APRIL

    A 3 10 11 12

    A- groupname

    3- count

    10,11,12 - ???? months ?

    need some explanation..

  • Use a matrix with your months at the top, your groups on the side, and your count as the data.

  • 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