• ScottPletcher - Monday, February 5, 2018 11:29 AM

    That's an Itzik Ben-Gap "Gaps and Islands" query.  Sorry, I don't have time now to fully flesh it out, but someone should come along shortly who can.

    Or he could search for one of the multiple solutions available online with detailed explanations.

    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