• Thanks Luis

    Firstly, that's a lot shorter than my code and (I assume) will run a lot quicker.

    Just a couple of questions, I've googled cross apply several times but I always get lost somewhere along the lines. Can you explain how it works in idiot-proof terms please?

    With the cross apply and cross-tab approach, does this mean the data will be read one instead of (in this case) 14 times?