I could do it in my sleep

Like many other programmers, I have adapted to a rather cat-like lifestyle of intense activity followed by relative languor. This coincides with the cyclic nature of the industry: Either there is too much work or too little. At the moment, there’s too much work, so I’m tending to work around twelve-hour days, often more. Of … Read more

Sir! My dog ate my database.

In asking various colleagues about the disasters or near disasters they have had with databases, I find to my astonishment that I am the only one who has ever, in a moment when my attention wandered, deleted a live database. It is odd, though, how products geared solely to mopping up from database disasters sell … Read more

If you go down to the woods today…

–On the drawing of  teddy-bears/*I have been gently reproached for making my blog too developer-oriented, and geeky; thereby making managers feel neglected. We therefore introduce Teddy, our foray into unashamed  nostalgia in the days of 80×25 character terminals. In those days, immense effort was expended in drawing pictures in this unpromising medium*/ Create   procedure spTeddy@teddy varchar(8000)=null output asSelect … Read more

Getting Stuff Into SQL Server

Often, Newbies to SQL Server are left feeling puzzled by the difficulty of ‘Getting stuff in and out’ of data tables. At first it does seem daunting, and I have to admit that I’m still a bit vague on some aspects myself. How, (or why) would one get image data in or out of a … Read more

A SQL Limerick

It wasn’t my idea at all. However someone set me the challenge of writing executable code that rhymed and scanned in the form of a limerick. Obviously, the easy trick is to just to write the limerick, assign it to a string and then do text substitution on that striing to convert it into SQL … Read more

Monthly Calendars in Transact SQL

/*I have been seized with the novel idea of writing something useful in a BLOG entry. My eye was caught by the rather fetching calendar in the top right of the BLOG. I’ve had to write Transact SQL code that produces calendars like this in production systems before now; Most often when one has to … Read more

Unreadable code

Producing unreadable Transact SQL is something of an art form. We all know that the best Transact SQL Style is to make everything elegant and obvious, with explanatory identifiers, liberal comments and deft formatting. It doesn’t always happen, for a number of reasons. One of the more subtle effects of acute caffein poisoning is to … Read more