• Hi Sean

    Thanks for getting back to me and I hope you'll be able to help.

    Ok, here is the DDL you were looking for:

    IF OBJECT_ID('TempDB..#MyTable') IS NOT NULL

    BEGIN

    DROP TABLE #MyTable

    END

    CREATE TABLE [dbo].[#MyTable]

    (

    [WeekEndDate] [date] NULL,

    [site] [varchar](5) NULL,

    [ItemDescription] [varchar](75) NULL,

    [PlanItemsSold] [int] NULL,

    [ActualItemsSold] [int] NULL

    )

    SET IDENTITY_INSERT #mytable ON

    --===== Insert the test data into the test table

    INSERT INTO #MyTable (WeekEndDate, [site], ItemDescription, PlanItemsSold, ActualItemsSold)

    SELECT 'Aug 12 2012 12:00AM', 'Central', 'Item1', '10', '7'

    UNION ALL SELECT 'Aug 12 2012 12:00AM', 'Central', 'Item2', '5', '3'

    UNION ALL SELECT 'Aug 12 2012 12:00AM', 'Central', 'Item3', '21', '7'

    UNION ALL SELECT 'Aug 12 2012 12:00AM', 'South', 'Item1', '14', '3'

    UNION ALL SELECT 'Aug 12 2012 12:00AM', 'West', 'Item2', '11', '7'

    UNION ALL SELECT 'Aug 19 2012 12:00AM', 'West', 'Item1', '17', '9'

    UNION ALL SELECT 'Aug 19 2012 12:00AM', 'North', 'Item1', '21', '32'

    UNION ALL SELECT 'Aug 19 2012 12:00AM', 'East', 'Item1', '13', '19'

    --===== Set the identity insert back to normal

    SET IDENTITY_INSERT #MyTable OFF