SQL Server rows appear to not be deleting

The Stupid Problem You are working on a database that you are not very familiar with as a developer – meaning that you are not going to think of every little thing that a DBA...

Sql Server tSql: DELETE statement executes but won’t delete

Problem I ran into the most puzzling issue recently where I was executing a DELETE statement inside of a transaction among other statements inside of a stored procedure. Then the weirdest most puzzling thing happened, the statement executed,...

I have no words for how bad this is

I think this should win the “Most Horrible Sproc Parameters” contest if there were such a thing. And then people wonder why I get mad when I see stuff like this. Just wow… Like I...

How to use Excel and tSQL to help you Generate Code

Introduction It’s amazing to me the reactions I get when I show people seemingly simple tricks on how to automate or generate code and/or script generation. Whenever I see a pattern, that means there is...

Simple Class Creator and DTO Generator

What? A long time ago back around the middle and towards the end of 2012 I decided to create a console application that would help me get very mundane repetitive work out of the way....

How to Kill all Processes for a Specific Database

Usually you would just use the Activity Monitor like shown below… The mundane repetition of right click each process and selecting Kill Process becomes annoying after the n_th process.  …buuuuut if you need to restore...

Entity Framework: Executing SQL Strings

I’ve griped about this before, not sure why everything has to be so complicated with EF at times, but holy hell executing just a simple SQL String “SELECT * FROM Table” is a major feat...