• It's a great thing that you found an answer that will perform correctly and will be fast and simple to understand and an answer that will help you to learn more about different techniques.

    I'm sure there are many possible variations to obtain what you need and that's the greatest thing about SQL.:-D

    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