• [font="Arial"]

    I suggest you go thru PIVOT Tables once if you have time...

    [/font]

    IF the dates are constant you can frame up this way

    select * from (

    select ID,Description,

    CONVERT(nvarchar(4),year(cdate))+right('00'+CONVERT(nvarchar(2),month(cdate)),2)+

    right('00'+CONVERT(nvarchar(2),day(cdate)),2) as Cdate

    from dbo.shatTest_tbl

    ) dataTable

    PIVOT

    (

    COUNT(ID)

    for cdate in ([20100701],[20100702])

    ) PivotTbl