• It's good, but it still doesn't resolve the biggest problem with SQL's PIVOT functionality (which is no fault of yours), which is that there is no way to create a dynamic pivot result-set that you can join to.

    For example, if you could create a dynamic pivot in a table valued function then you could join to the function, but there isn't a way to create a dynamic pivot UDF.

    PIVOT would be a heck of a lot more powerful if you could do that...