Archive for September 27, 2009

Building ranges using numbers

A while back, I posted a solution to a problem I was facing where I needed to generate a table of ranges.  While I haven’t experienced any sort of issues with the solution, a couple of things have recently occurred which has caused me to go back and take a look at the problem, and [...]

September 27, 2009 · stuart · No Comments
Posted in: SQL, SQL Server, SQLServerPedia Syndication

FizzBuzz

Stumbled across Mike Hillwig’s post in response to a question posed by Brent Ozar.  Depending on how literally you want to use the word “print” (do you mean the actual command, or do you just want output?), I think I have a slightly more elegant solution than what Mike proposed. SELECT CASE WHEN n%3=0 AND [...]

September 27, 2009 · stuart · No Comments
Posted in: SQL, SQL Server, SQLServerPedia Syndication