Let’s get this out of the way right now: I am SO going to take advantage of this T-SQL Tuesday on aggregates to talk about OVER() and PARTITION BY. Aggregates and OVER go together like french fries and catsup…sure, you can have them apart, but together they’re just magical. Note: If you’re not at all familiar […]
Category: TSQL
Top 10 SQL #Awesomesauce for 2010
Here at MidnightDBA.com, we’re all about you! And us! It’s just us, and you. Which is why I’ve put together the top 10 SQL Awesomesauce blogs of 2010 – by me, for you! (Note that I only put the hit counters in place sometime in July, so this is more like the top 10 for […]
T-SQL: CASE Statement
This is a companion piece to the MidnightDBA video T-SQL: CASE Statement. In short, a CASE statement is a simplified set of IF statements. Instead of using several IF statements, you can have a single statement that evaluates several criteria against a piece of data. Simple CASE Let’s take a simple example. We want to […]