Choose your names wisely

Tip: Avoid using reserved words as object names. The other day, I chose a name for a schema in SQL Server that had some unintended consequences. I had created some audit tables to track historical changes and named the schema "audit". It didn't occur to me that "audit" is a SQL Server reserved word. I... Continue Reading →

Fill in the Blank

I've climbed Rainier a couple of times and there were a few crevasses we had to cross. Some were just a mere jump, others were wider and had to be crossed with a ladder.  Got me thinking about crevasses in data and how you might want to fill in those crevasses with the last known... Continue Reading →

SQL Server: Splitting Strings

Today I was asked how to extract the directional component from a street address. For example, the following 3 street addresses should have a directional value of 'East': E Street East Road Big River Blvd E My first approach was to do the old fashioned case statement. Select street_address , case when address like 'E%'... Continue Reading →

Powered by WordPress.com.

Up ↑