This is a duplicate post. I recommend we keep it all together at the other post, which is located at http://forums.sqlteam.com/t/loop-through-results-returned-by-pivot-table/6581
This is a duplicate post. I recommend we keep it all together at the other post, which is located at http://forums.sqlteam.com/t/loop-through-results-returned-by-pivot-table/6581