• timothyawiseman (12/21/2008)


    So when I have the time, I always think through the set based solution for SQL, but I have no hesitation to just jot out the procedural version one time and be done with it if deadlines loom nigh.

    Exactly what I've talked about on various other threads... managment is to blame for that because they don't understand that a database is much more than just a place to store data.

    And the piano analogy is not perfect there. If you are playing the piano and hit the wrong note it sounds bad and the final product (the music) is markedly flawed. If you are writing code and you write a suboptimal piece of code, it is suboptimal not wrong. The end user may never know, especially if the final product is a spreadsheet with analysis and they never see either the code or its running process.

    You're right... with a piano, you know you've hit a wrong note and can correct it immediately. With bad/suboptimal code, it may take a while... and then it'll be harder to find what the problem is and correct 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)