Tag Archives: T-SQL

Comparing an Old Running Total to Window Functions

Often I see running totals that are written in SQL using a variety of techniques. Many pieces of code were written in pre-2012 techniques, prior to window functions being introduced. After SQL Server 2012, we had better ways to write … Continue reading

Posted in Blog | Tagged , , | 2 Comments

Bad Stored Procedures

I don’t see a lot of SQL at The Daily WTF, but this one was great. It’s a stored procedure that was likely just converted from embedded code, as noted by the poster. It’s a strange set of code, that … Continue reading

Posted in Editorial | Tagged | Comments Off on Bad Stored Procedures

Finding Where xp_cmdshell is Used

I saw a post recently where someone was concerned about where xp_cmdshell was in use inside their system. They felt it was a security risk, and decided to get rid of it. I don’t agree with that, and I think … Continue reading

Posted in Blog | Tagged , | 1 Comment

The Basics of TRY CATCH Blocks–#SQLNewBlogger

I was working with a customer and discussing how to do error handling. This is a short post that looks at how you can start adding TRY.. CATCH blocks to your code. Another post for me that is simple and … Continue reading

Posted in Blog | Tagged , , | 5 Comments