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

  • Nice one Cadavre!

    That's the same collation issue that I was trying to address the other day when timing REPLACE on another thread.

    Just one question though. Did Jeff Moden put you up to this? He's been telling me that he was hoping other people would take up for him and run this kind of performance testing instead of him always having to do it. 🙂

    I like your test harnesses.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St