Our Blogs

WE LOVE TO SHARE

So here are our latest blogs sharing what we have learnt lately, we hope it will make your life easier.

Comparing sets in SQL

I was shown the following technique for comparing tables when I was a junior programmer many years ago. WITH A as (SELECT something) , B as (SELECT another_similar_thing) SELECT * FROM A MINUS SELECT * FROM B UNION ALL SELECT * FROM B MINUS SELECT * FROM A; This...

Drop if exists considered harmful

I read lots of examples on the internet that check if an object exists, and then drop it before creating it. You'd be excused for thinking that this is good practise. It's not. Dropping an object has negative side effects: Fisher emphasizes that all of the GRANTs and...

Show and Know beats Care and Prayer

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 experience. Still, I'm continually surprised to find smart people working in the "Care and...

The Exec Exec trick

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 dynamic SQL. I start with a statement that I want to execute, that I have generated dynamically....

Top Books on Programming

We're always hiring here at OptimalBI. Our new staff have a variety of experience, and a variety of gaps in their knowledge as a result. I recently prepared the following list of my favourite books on programming for one of our new hires. There are more than a few...