SQL Upsert

SQL Upsert

One of the first days at my first programming job, I was told to create and “Upsert Stored Procedure”. My first thoughts were, “Oh he had mistaken, it was insert he meant to say.” But no, Upsert is the correct term. An Upsert is simply an update or an insert, and as a...
Circular Dependency

Circular Dependency

The problem we faced was every time an exception was thrown; an email was sent to multiple people. This would result in waking up and having 80 identical emails in our inboxes. I was tasked with stopping this from happening, send only one email per exception. As a...
Creating a SQL Exception

Creating a SQL Exception

When a SQL Exception is encountered in a function, it can be categorized based on the SQL Number. This is especially useful in scenarios like Unit Testing, where there might be a need to create a new SQL Exception for testing purposes. //create the SQL Exception...