• Sean Lange (10/18/2013)


    Jeff Moden (10/17/2013)


    mister.magoo (10/17/2013)


    ...Time Of Day is not something you can average...

    Gosh... I have to disagree with that statement that you and Sean made. What if the task is to find the average time of day when someone gets to work, for example?

    Perhaps I was not clear enough in my statement. You can't calculate the average time of day like you would other values. I do believe that the calculation I posted does in fact calculate exactly what you are saying here.

    Understood. That just makes it sound to the casual reader like it can't be done and wanted to make sure that people understood that it can be done but not directly. Your good code does, in fact, calculate the average using that very method.

    --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)