A recent blog was extolling the advantages of being able to use the CLR routines in SQL Server 2005 to do Microsoft-style date formats, instead of having the fuss and bother of remembering the CAST or CONVERT styles for the various representations of dates It is actually quite easy to do these date formats in SQL … Read more
…in which Phil Factor takes advantage of the cloak of anonymity to confess to an embarassing mistake As an IT Manager, I used to love doing staff appraisals. These rituals come by different names in different companies, ‘performance reviews’, ‘annual reports’, ‘staff assessments’ and so on. There are periodic crazes for pinning a different name … Read more
Phew…with SQL Backup 4.1 released attention has now turned to supporting 64 bit versions of SQL Server. There is no let up and testing already underway, with a beta planned for 24th April 2006. Please email me (helen.joyce@red-gate.com) if you want to be part of the beta program and be one of the privileged few to … Read more
In which Phil tries to warn you of the dangers of over-valuing Website-traffic Stats. A friend who runs a local history website in a rural area of England surprised me by saying that he values a single letter of interest or appreciation more highly than any amount of increased web-traffic on his site. He gave … Read more
Palindromes are words or phrases that read the same backwards and forwards. By the same token, Palindromic SQL executes just as well backwards and forwards A phrase such as … “Did I do, O God, did I as I said I’d do? Good, I did” “Marge lets Norah see Sharon’s telegram” “No, son, onanism’s a … Read more
I hate to depart from my usual ranting and raving and actually post some useful code, but the below is too lovely to ignore. Before I proceed to take credit, I have to thank Google and the following poster(s): http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=228499&SiteID=1. The below is a rather elementary explanation of the code posted therein, with a generic … Read more
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
OK.. this has nothing to do with SQL, and for that I apologise. But it does have some relevance to usable design and application development: Watch the video and hurry on back…. SPLINK OK.. so it’s a road safety message for children enjoying the 1970’s in the UK. I can remember this one, scarily enough. … Read more
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
Once again I find myself penning a missive on trivia, rather than matters of import. Still, now we’re here… Regular expressions. To a large extent, I hate them. To begin with, they are a complete misnominer. They are neither regular, nor expressions. Don’t believe me? To demonstrate this I’ll consult an authority on such topics. … Read more
Things weren’t going swimmingly. In fact, you could say it was an unmitigated disaster. That might sound overly dramatic though, so let’s just say things were somewhat less optimal and keep it quiet. Nobody needs to know. In fact, forget I even mentioned it. Forget this even. No really… stop reading. Why are you still … Read more
I was recently thinking if I really liked to use the Multiple assignment in ‘C#’ or if it was less readable. In ‘C’ this syntax was popular as it tended to lead to smaller and quicker code.So I wondered in C# if the multiple assigment also lead to quicker code. So I quickly wrote some … Read more
As prizes for the little occasional competitions on this BLog, we will be giving out copies of one or other of a couple of rather old books. They just happen to be two of the best books ever written about developing software. I’d be fascinated to hear of any other books in the same league. … Read more
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
When I did my degree, nobody told me that my life would forever be cursed. Not once was I taken aside, sat down, and told in clear and simple words that my life would never be the same. Like hyperactive kittens faced with a vat of warm fishy milk, we lapped up the techniques to … Read more
This is sheer genius: System.Math.Sin( double a )System.Math.Cos( double a )…etc all take an angle in radians as their argument. However: System.Drawing.Drawing2D.Matrix.Rotate( float angle )and System.Drawing.Drawing2D.Matrix.Rotate( float angle, MatrixOrder order ) both take the angle in degrees. Who on earth designed this?!?? … Never mind, it’s not that important. I’m just going to take a … Read more
You can easily add your own exceptions into Visual Studio so that you do not need to add them in each time into your project when debugging your code. I have only checked this against Visual Studio 2003, but it looks like it would works the same in Visual Studio 2000 and Visual Studio 2005. … Read more
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