JSONTABLE – Shredding JSON data into a relational structure

Even though support for XML data has been in the product for a long time now (introduced in SQL 2000 and then improved in SQL 2005), whenever I’m working with it I still find it completely unintuitive and constantly have to refer back to the documentation and previously worked examples. Most of all I rely Read more about JSONTABLE – Shredding JSON data into a relational structure[…]

Closed answer technical tests and when ‘it depends’ isn’t an option

Many months ago when I was working as a SQL Server contractor, I was approached by a recruiter who was looking to fill a contract role, and as part of the initial screening, the client had asked all potential candidates to answer a simple 4-question, true-or-false SQL quiz. When I read the question, and the Read more about Closed answer technical tests and when ‘it depends’ isn’t an option[…]

Building a string of values in T-SQL

It is often far too easy to experience some behaviour in SQL Server, and then extrapolate your belief from that. One example that is seen frequently on forums is the simplistic case of concatenating values into a scalar variable, however the logic that is commonly assumed is false. Take the example USE tempdbGOIF OBJECT_ID(‘CharsTable’,’U’) IS Read more about Building a string of values in T-SQL[…]

Helping the Query Optimizer with Constraints

The Query Optimizer in SQL Server is an amazing piece of code. It takes any query we choose to throw at it, evaluates many different ways of executing that query and, generally speaking, comes up with an execution plan that is going to be good enough. And it does all that in milliseconds. Sometimes it Read more about Helping the Query Optimizer with Constraints[…]

Leeds SQL Server User Group – 1 December 2016

Returned to the Leeds SQL Server User Group for the first time in a long time.  I previously worked in the office building that hosts the user group, and wow has it changed! Not only was it a long overdue return, but it was also my first time presenting at Leeds too.  Here are the Read more about Leeds SQL Server User Group – 1 December 2016[…]

Activity Monitor with % Prcessor time graph greyed out

SSMS Activity Monitor greyed out Processor graph

There have been a few posts about SSMS Activity Monitor recently. First Kendra Little (b | t) talked about why she doesn’t like it and then Guy Glanster (b | t) and Matan Yungman (b | t) also discussed the failings of Activity Monitor on their SQL Server Radio podcast – mainly it’s to do Read more about SSMS Activity Monitor greyed out Processor graph[…]