• From you're DDL, I can't see the FK relationship, so I'm not sure how you're joining your two tables. After you've done that, you can take a look at this: http://www.kodyaz.com/articles/t-sql-pivot-tables-in-sql-server-tutorial-with-examples.aspx for Pivot examples.

    HTH,

    Rob