Category Archives: SQL

Guess my number for SQL Server

My Girls (8 and 10) and I wrote a “Guess my number” game in SQL this weekend.  Well, the truth is closer to I wrote it and they played with it.  Although this is quite simple, and often one of the first projects that a developer will create while learning a language, I will share my creation that took about 3 minutes to create. Read more »

Playing With Hierarchies

In our world of data, often times we come across data that represents a hierarchical structure.  I recently was asked to work on a design that would utilize the hierarchyid datatype that was introduced in SQL Server 2008.

Our task was to bulk load multiple nodes of a hierarchy into a single table structure, with the possibility of having multiple parents.  Since multiple parents are not supported in the hierarchyid datatype, I had some creative work ahead of me.

Read more »