How to Write Dynamic SQL Well

Dec. 1, 2014 by

Dynamic SQL has a bad reputation. When I started as a DBA I had a code quality checklist that had dynamic SQL on it as a problem. I later wrote

Show and Know beats Care and Prayer

Nov. 25, 2014 by

As a consultant I rarely see systems that are operating well. People don’t take their cars to the mechanic when they are functioning properly. I appreciate that this colours my

Automating Oracle Data Integrator

Nov. 13, 2014 by

I’ve worked on a lot of warehouses using a number of different ETL tools. Most of these tools make my job as technical lead very difficult. They are opaque: they

The Exec Exec trick

Nov. 11, 2014 by

SQL Server’s Transact SQL has some weird constraints. One of which is that certain statements must be the first one in their batch. This causes all kinds of head-aches for

T-SQL Common Table Expressions are Turing Complete

Sep. 11, 2014 by

I’ve seen some wonderful, powerful, and creative T-SQL Common Table Expression (CTE) SQL statements recently. Our tools have been improved, and we’re eagerly exploring them. Recursive CTEs make individual SQL