• Check out this article on Dynamic Crosstabs by Jeff Smith:

    http://weblogs.sqlteam.com/jeffs/archive/2005/05/02/4842.aspx

    -smc