Home Forums SQL Server 2008 SQL Server 2008 - General Roll Up Function RE: Roll Up Function
laurie-789651
SSCertifiable
Points: 7680
More actions
August 7, 2012 at 4:37 am
#1522489
You can roll up selected values and add them to each record like this:
SELECT Country,Region, Current_Forecast,
SUM(Current_Forecast) OVER (PARTITION BY Country, Region) as Sum_Current_Forecast
FROM My_Table