Jeff's SQL Server Blog

Random Thoughts & Cartesian Products with Microsoft SQL Server
posts - 138, comments - 1711, trackbacks - 64

My Links

SQLTeam.com Links

News

Welcome to my weblog. My name is Jeff Smith, and I am a software developer in Boston, MA. Check in frequently for tips, tricks, commentary and ideas on SQL Server and .NET programming.


Subscribe





Archives

Post Categories

Programming

Sports

SQL

September 2007 Entries

A handy but little-known SQL function: NULLIF()

posted @ Thursday, September 27, 2007 9:50 AM | Feedback (14)

Optimizing Conditional WHERE Clauses: Avoiding ORs and CASE Expressions

Here's some quick tips on optimizing your SELECT statements when implementing conditions in your WHERE clause based on optional parameter values. read more...

posted @ Tuesday, September 18, 2007 4:25 PM | Feedback (23)

Filter by month (plus other time periods)

Another common area of difficulty or confusion for SQL beginners is how to efficiently retrieve data just for a single month. What is the best way to declare parameters that will be used to indicate which month you are looking for, and how can we efficiently and easily make use of those parameters to get back the data we need? read more...

posted @ Friday, September 14, 2007 12:21 PM | Feedback (5)

Group by Month (and other time periods)

When you need to summarize transactional data by Month, there are several ways to do it, some better than others. What to ultimately choose depends on your needs, but remember: Keep it short and simple in T-SQL, and always do all of your formatting at your presentation layer where it belongs. read more...

posted @ Monday, September 10, 2007 11:28 AM | Feedback (28)

Powered by: