Category: Humor

T-SQL & Development

Stupid T-SQL Tricks

Presented without comment:
[crayon-6a7398c4c29cf896015471/]
Next up, can you break up a query with spaces? Yep:
[crayon-6a7398c4c29da805890539/]
Well if you can do that - can you break up a query across lines? Sure you can:
[crayon-6a7398c4c29dc440251052/]
And now, brace yourself: this one is so weird that I can't even embed it in the blog. I'm just going to show you a picture of it first:

Read more about Stupid T-SQL Tricks 33 comments — Join the discussion
News & Opinion

#TSQL2sday: What I’m Passionate About – Sas Christian’s Art

For this month's T-SQLTuesday, Aaron Bertrand asked what we're passionate about - but outside of the tech community, and asked for pictures. Seems like a great way to get to know about us.

From my personal blog and my Instagram feed, you probably already know that I'm into cars, travel, and food, so I wanted to pick something different to share with you.

Read more about #TSQL2sday: What I’m Passionate About – Sas Christian’s Art 8 comments — Join the discussion
T-SQL & Development

Creating Insert Triggers to Silently Ignore Data You Don’t Want

Say you've got an application that insists on inserting data into the database, and...you don't want the data.

You want the application to THINK it inserted the data - you don't want to roll it back or return an error to the end user. You just don't want the data, and you don't want the hassle of deleting it later.

Read more about Creating Insert Triggers to Silently Ignore Data You Don’t Want 19 comments — Join the discussion
Performance Tuning

How to Drop All Your Indexes – Fast

Sometimes I need to reset stuff during performance training classes. I know some of you teach classes, too, and some of you just like doing crazy stuff. So here you go, a stored procedure to lose weight fast: DropIndexes for SQL Server 2016 & Newer [crayon-6a7398c4cf696142174710/] DropIndexes for SQL Server 2008-2014 This one doesn't include…

Read more about How to Drop All Your Indexes – Fast 28 comments — Join the discussion
News & Opinion

CTEs, Views, and NOLOCK

This is a post because it surprised me
It might also save you some time, if you're the kind of person who uses NOLOCK everywhere. If you are, you're welcome. If you're not, thank you. Funny how that works!

I was looking at some code recently, and saw a CTE. No big deal. The syntax in the CTE had no locking hints, but the select from the CTE had a NOLOCK hint. Interesting. Does that work?!

Read more about CTEs, Views, and NOLOCK 12 comments — Join the discussion
News & Opinion

First Responder Kit Release: We hired Brent back because he promised to fix his code

March comes in like a 40 of Steel Reserve and leaves like your memory of the night after drinking a 40 of Steel Reserve.

Get it here!
sp_Blitz Improvements
-- #758 and #756 We made it less scary to run on Express Edition. Why? Because running Express Edition is scary enough. Coded by @Totty1973 and @BrentOzar

Read more about First Responder Kit Release: We hired Brent back because he promised to fix his code 4 comments — Join the discussion
News & Opinion

Stupid Things I’ve Done With SQL

I Always Enjoy Reminiscing
And that header is a lie. I do enjoy thinking about stuff I used to have to do at work, because I don't have to do it anymore. While we mostly gripe about the on-call stuff, the late night maintenance windows, etc., we don't usually talk about the goofy stuff we've done. What follows is a non-comprehensive (and embarrassing code free) list of things I've done with SQL that I really should have used something else to do.

Read more about Stupid Things I’ve Done With SQL 20 comments — Join the discussion