• dwain.c (1/1/2013)


    CROSS APPLY (

    VALUES(High, 'High', DATEPART(dw, CAST(DateID AS CHAR(8))))

    ,(Low, 'Low', DATEPART(dw, CAST(DateID AS CHAR(8))))) a(Val, Type, weekday)

    GROUP BY CompanyName, Type

    dwain , can you please explain above sql code , i am finding it hard to understand :sick:

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)