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 » bad habits » best practices   (RSS)
  • Bad Habits to Kick : Thinking a WHILE loop isn't a CURSOR

    I see a lot of people suggest while loops instead of cursors in situations where row-based processing is required (or, at least, where folks think that row-based processing is required). Sometimes the justification is that constructing a while loop is simpler and more straightforward than constructing a cursor. Others suggest that a while loop is ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on January 26, 2012
  • Bad Habits to Kick : Using AS instead of = for column aliases

    This one is quite subjective, and I'm sure I will face plenty of opposition - not only because it's a preference thing and many people are married to their preferences, but also because it violates the strict interpretation of the standard. Personally, I'm more worried about the former than the latter - I have no concerns whatsoever that ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on January 23, 2012
  • Bad Habits to Kick : Using shorthand with date/time operations

    I've come across quite a bit of code that uses date/time shorthand that can either be confusing or downright dangerous. There are two areas I want to focus on: shorthand for date arithmetic, and shorthand for date parts. Date Arithmetic This one I mentioned quite briefly in a previous ''Bad Habits to Kick'' post, but I see it in use enough ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on September 20, 2011
  • T-SQL Tuesday #21 : Crap Code

    Yes, Adam is right: we've all written crap code (the topic of this month's T-SQL Tuesday Wednesday. Usually we have an excuse: tight deadline, short shelf life of the code, or didn't know any better. I'm sure if I perused my career codebase I'd find tons and tons of examples that I'd write differently today, because back then it fell under ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on August 10, 2011
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement