• J Livingston SQL - Tuesday, June 27, 2017 6:20 AM

    I think that this is the origin of the question, along with the some of the solutions

    by Itzik Ben-Gan

    http://sqlmag.com/blog/tsql-challenge-reoccurring-visits
    http://sqlmag.com/blog/solutions-tsql-challenge-reoccurring-visits

    Cool.  Thanks, Graham.  Looks like I got the problem definition wrong after all.  This is for day to day, not overall like my code has it.  Leave it to Peter Larsson on these types of things.  He has one of "those" brains.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)