• talltop-969015 (11/10/2009)


    Alexander Kuznetsov-291390 (11/10/2009)


    I decided that I don't want to put it into production - they are just a little bit too complex and they do not look robust to me. In my book this is one of those cases where denormalization allows for much faster and significantly simpler solutions

    Probably a very smart decision in the long run Alex. I have been in that situation many times before where I discover something really kind of neat in SQl Server, but after some serious deliberation and some serious testing as well, I finally realized that discretion is the better part of valor and decided to just leave it out of my production environment. 😛

    Yep... that's why I included the Cursor code. If you don't trust in the "Quirky Update" (even though no one has been able to break a properly written one since the first article came out), then do as I said in the article.... use a Cursor, CLR, or some other method you deem satisfactory. I do, however, believe that you're missing out on a very powerful tool. Running totals aren't the only thing this method can be used for.

    Either way, thanks for stopping by and taking the time to write a bit of feedback. I appreciate it.

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