The Bit Bucket

BETWEEN vs >= and <=

I love it when I get queries that are actually easy to answer.

Today, one of my developer friends asked me if it was better to use BETWEEN or to use >= and <= when filtering for a range of dates.

From a logic perspective, I like the idea that a single predicate expresses your intent rather than needing two predicates to do the same. For example, consider the following two queries:

2016-03-02

Database on a diet (Part 1)

Hi Folks,

My next article for SQL Server Magazine is out now. I’ve decided that New Year is the time that most people discuss diets and databases don’t have to be an exception.

I’m discussing one large client who had a database that really needed to be trimmed down. That involved a whole range of mechanisms and the outcome was great: major size reduction and significant performance improvement.

I’ve decided to discuss this across a series of articles, each covering part of the story about how the reductions were produced and the rationale for each.

2016-01-28

New-Object : Constructor not found. Cannot find an appropriate constructor for type

This one is here so that I don’t forget it in future.

I’ve been writing Powershell again all day today and I spent ages trying to find this error when instantiating a particular object.

Bottom line is that there was a valid constructor that took a single string argument. However, I was passing an empty string to the constructor. Let’s just leave it at “The error message returned is interesting”.

2016-01-17

Icons and the real world

Just realised that book icons are another one that will probably lose meaning over time. That’ll apply to book icons for dictionaries and thesauruses too.

image

Phone icons are already pretty odd as many kids would never have seen a phone that looks like those icons.

image

And the Save icons that are a picture of a 3 1/2 inch floppy disk are basically meaningless now.

image

I had to laugh when I heard a kid who saw a 3 1/2 inch floppy for the first time comment that someone had made “a actual save icon”. I suppose that’s how it seemed to him.

2016-01-01

My Sessions from Ignite Australia on the Gold Coast now online

Hi Folks,

Couldn’t make it to Ignite? The team from Microsoft Australia recorded all the sessions and they are online now.

Here are the three sessions that I delivered:

Azure Datacamp Power Hour:  NOTE: This event is now closed

Things I Wish Developers Knew About SQL Server: NOTE: This event is now closed

Working With SQL Server Spatial: NOTE: This event is now closed

Enjoy!

2015-12-11