For some reason I have always written my Case statements using the following logic: It wasn't until recently that I noticed that there is another syntax that can be used with the CASE expression, the interesting part about this other form is that it is rather aesthetically pleasing when dealing with multiple WHEN clauses... Continue Reading →
Are your backup files where they say they are?
I was having a cleanup of some old scripts the other day when I stumbled upon a script I wrote some time ago. I remember writing the script because from time to time I would get asked if I can restore a copy of a specific database to a particular point in time... Continue Reading →
Selecting a Random Row From a Table
A couple of times recently I've seen the question asked, 'How can I select a single row at random from a table?'. There are often a few ways of doing this suggested, most seem to rely using CTEs or temp tables. I thought I'd share, in a quick post a very simple and easy way... Continue Reading →