Home Forums SQL Server 2008 T-SQL (SS2K8) tsql query - Count the number of spaces in a string RE: tsql query - Count the number of spaces in a string

  • Cadavre (6/20/2012)


    Shall we take a look at performance?

    Out-freakin'-standing, Craig! Well done and spot on especially with bringing up the collation problem. If no one rose to the occasion for testing, I was going to but, like Dwain said, I've been trying to get someone else besides me to do the testing. Since you've done this so often, I could have guessed it would be you to take up the ol' "A Developer must not guess, a Developer must KNOW" banner. Very well done and, yeah, it brings a tear of happiness to this ol' man's eyes to see someone do it so well. My hat's off to you.

    I guess I'm going to have to ask the "which is faster" question more often instead of always doing it myself. Thank you VERY much for the effort you put into the test.

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