• Hi

    Yes normalize should work but if you can get your dates to be more like and integer value like 20140707 = 7-jul-14

    then the following idea might work better for you.

    CREATE TABLE #Planner(

    [Name] [nvarchar](255) NULL,

    [ProjectName] [nvarchar](255) NULL

    ,[20140707][nvarchar](255) NULL

    ,[20140714][nvarchar](255) NULL

    ,[20140721][nvarchar](255) NULL

    ,[20140728][nvarchar](255) NULL

    ,[20140804][nvarchar](255) NULL

    ,[20140811][nvarchar](255) NULL

    ,[20140818][nvarchar](255) NULL

    ,[20140825][nvarchar](255) NULL

    ,[20140901][nvarchar](255) NULL

    ,[20140908][nvarchar](255) NULL

    ,[20140915][nvarchar](255) NULL)

    insert into #Planner (Name,ProjectName,[20140707]

    ,[20140714]

    ,[20140721]

    ,[20140728]

    ,[20140804]

    ,[20140811]

    ,[20140818]

    ,[20140825]

    ,[20140901]

    ,[20140908]

    ,[20140915]) Values ('Mike','Audit','10','10','10','0','5','5','5','4','15','14','10')

    SELECT * from #Planner

    SELECT Name,ProjectName,cast(Value as int) Value,Date

    Into #table

    FROM

    (SELECT Name,ProjectName,[20140707],[20140714],[20140721],[20140728],[20140804]

    ,[20140811],[20140818],[20140825],[20140901],[20140908],[20140915]

    FROM #Planner ) p

    UNPIVOT

    (Value FOR Date IN

    ( [20140707],[20140714],[20140721],[20140728],[20140804],[20140811],[20140818],[20140825],[20140901],[20140908],[20140915])

    )AS unpvt

    GO

    select Name,ProjectName, Sum(value) As Value

    from #table

    where date between 20140728 and 20140804

    group by Name,ProjectName

    Please give your feeling about this method

    --------------------------------------------------------------------------------------------------------------------------------------------------------
    To some it may look best but to others it might be the worst, but then again to some it might be the worst but to others the best.
    http://www.sql-sa.co.za