• It's good to know the solution worked fine. However, you should understand it before using it.

    Two tips I can give you are to use the PRINT command I included but left commented and read this article from Jeff Moden: Cross Tabs and Pivots, Part 2[/url]

    If you still have doubts on the code, feel free to ask.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2