• i seems that you are new to SSC .Welcome here.

    one suggestion.

    While posting to any forum you must include/post table defintion along with test data. it will help others to give you solution quickly.people devote their time from their busy schedules.sometimes they dont have time to frame everything on theri own.

    So please post some data plus table defintion.

    and now on your problem. you would be needed to play with pivot apprach here.

    see link http://blog.sqlauthority.com/2008/05/22/sql-server-pivot-table-example/

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