Question : How to add totals to a row in a sql 2008 pivot stored procedure

Here is my existing code which works fine, but I need to add a total onto the end of each row. this must be fairly standard but I'm getting confused by the number of different approaches and I need something simple that works. Can anyone help?

ALTER PROCEDURE [dbo].[SPMT_JournalByMonthParam] (@Journal nvarchar(50))

select YEAR, [1] as 'Jan', [2] as 'Feb', [3] AS 'Mar', [4] as 'Apr', [5] as 'May', [6] as 'June', [7] as 'July', [8] as 'Aug', [9] as 'Sept', [10] as 'Oct', [11] as 'Nov', [12] as 'Dec'
      from
      (SELECT dbo.VW_MT_JournalCountByMonth.Year, dbo.VW_MT_JournalCountByMonth.Month, dbo.VW_MT_JournalCountByMonth.EnqCount
      from dbo.VW_MT_JournalCountByMonth
      where dbo.VW_MT_JournalCountByMonth.Journal= @Journal ) ps
      PIVOT
      (
      sum (enqcount)
      for Month in
      ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12])
      ) as pvt
This is a sample of my cuurent results
YEAR      Jan      Feb      Mar      Apr      May      June      July      Aug      Sept      Oct      Nov      Dec
2003      3      2      7      10      11      5      8      8      12      7      9      6
2004      4      4      2      3      3      2      1      NULL      NULL      2      2      2
2005      7      2      3      6      2      3      4      3      NULL      2      1      NULL
2006      3      2      1      NULL      3      NULL      NULL      NULL      NULL      NULL      1      NULL
2007      1      NULL      NULL      NULL      1      NULL      NULL      NULL      NULL      NULL      1      NULL
2008      NULL      NULL      1      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL
2009      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL      NULL      2      NULL      NULL

sorry it wraps around. I just need to show a total column for the year (row) at the end of the row.,

Answer : How to add totals to a row in a sql 2008 pivot stored procedure

here's the attached code
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
select YEAR, [1] as 'Jan', [2] as 'Feb', [3] AS 'Mar', [4] as 'Apr', [5] as 'May', [6] as 'June', [7] as 'July', [8] as 'Aug', [9] as 'Sept', [10] as 'Oct', [11] as 'Nov', [12] as 'Dec',
        isnull([1], 0) + isnull([2], 0) + isnull([3], 0) + and so on... as total 
      from 
      (SELECT dbo.VW_MT_JournalCountByMonth.Year,  
                dbo.VW_MT_JournalCountByMonth.Month,  
                dbo.VW_MT_JournalCountByMonth.EnqCount 
        from dbo.VW_MT_JournalCountByMonth  
      where dbo.VW_MT_JournalCountByMonth.Journal= @Journal  
) ps 
      PIVOT 
      ( 
      sum (enqcount) 
      for Month in 
      ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]) 
      ) as pvt
Random Solutions  
 
programming4us programming4us