THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » T-SQL   (RSS)
Showing page 22 of 22 (215 total posts)
  • Performance: ISNULL vs. COALESCE

    Mladen aka spirit1 posted a speed test of COALESCE vs. ISNULL. Reported result: COALESCE is faster. But leave it to Anatoly Lubarsky to argue with what was posted. He posted his own speed test, showing that ISNULL is faster. Anatoly's results showed a miniscule difference, ''52 seconds'' vs. ''52-53 seconds''. Mlanden's tests show a ...
    Posted to Adam Machanic (Weblog) by Adam Machanic on November 30, 2004
  • Rowset string concatenation: Which method is best?

    Yeah, yeah, yeah, let's get this out of the way right from the start: Don't concatenate rows into delimited strings in SQL Server. Do it client side. Except if you really have to create delimited strings in SQL Server. In which case you should read on. There was a little discussion on SQLTeam about the best way to concatenate. I ...
    Posted to Adam Machanic (Weblog) by Adam Machanic on November 10, 2004
  • Is PATINDEX faster than LIKE?

    I keep seeing the same suggestion on various ''tips and tricks'' websites: For situations in which you might want to use LIKE in the WHERE clause, but for which indexes cannot be used, PATINDEX will perform faster.   So, according to these sources, this:  SELECT *FROM tblWHERE PATINDEX('%abc%', col) > 0 is faster than ...
    Posted to Adam Machanic (Weblog) by Adam Machanic on November 8, 2004
  • Paging in SQL Server 2005

    I keep seeing questions on newsgroups about paging in stored procedures, and whether there will be a better way in SQL Server 2005. However, aside from a few answers in newsgroups, I haven't seen any content on how to do it. So I'd like to spend a few minutes and share with you the new features that will make paging stored procedures ...
    Posted to Adam Machanic (Weblog) by Adam Machanic on November 3, 2004
  • Pattern-based replacement UDF

    As a personal challenge, I decided to write a UDF that will work just like T-SQL's REPLACE() function, but using patterns as input. The first question: How does REPLACE() handle overlapping patterns?  SELECT REPLACE('babab', 'bab', 'c')-------------------------------------------------- cab(1 row(s) affected)SELECT REPLACE('bababab', ...
    Posted to Adam Machanic (Weblog) by Adam Machanic on October 25, 2004
Privacy Statement