byrmol Blog

Garbage

The Migration

It looked like a normal day. The cars where smoking, the birds where coughing and the daily caffeine war had already begun. "Coffee making is an art" read the sign on the footpath. Read more →

Views are good

I recently came across a comment on a web page that said something to the effect of.. "I don't use views because of temporary tables, table variables and UDF's." Well tickle me pink. Read more →

Free Range SQL - It tastes better.

A common requirement from users is the ability to be able to search on the columns they want. In affect they would like to roll there own queries. As an example take the Employees table in Northwind. Read more →

A BCP GUI

Due to the excessive amount of BCP work that has plagued me recently, I was sick and tired of typing.Instead of writing a script in TSQL to build BCP commands, I decided on building a little GUI app. Read more →

Worst Column Name Ever

While moving some data between servers via BCP from a database that I have never seen before, I noticed that several of the tables failed to load into the target server. Read more →

An overlap constraint in SQL2K

A future requirement of 3 applications we support, is that they will be competing for a resource that they all share. In this case it is a series of Rooms for appointments. Read more →

The Missing System Procedure..

Doing some documentation today and it came to triggers. SQL Server has "sp_helptrigger" but it must be passed in a table name. I looked around on the web and have found a few bits of code (a couple of UDF's and some basic ones) so I thought i would create one based on the original and add it to master for reuse in any db. Read more →

The most abused statement in TSQL

CREATE DATABASE No, not the fact that anyone can create a database but the "advanced" options. The amount of times I have seen this statement butchered is enough to warrant a post. Read more →

The database is your BLL

It is very obvious that a lot of people have absolutely no idea what a business model is or for that matter a database. The number of times I have seen business rule code that should be imbedded in the database definition and not in the BLL (Business Logic Layer) just makes me want to scream. Read more →

DataTable Relational Operators in C# - TCLOSE Method (Recursion)

This TCLOSE method has no equivalent in TSQL TCLOSE stands for Transitive Closure and is used to solve hierarchy representations, most notably the part explosion problem. The algorithm used here is the Semi naive method as outlined in "An Introduction to Database Systems 7th Edition. Read more →