Palindromic games with the SQL MVPs

Itzik Ben-Gan posted a challenge to his blog and to the SQL MVP newsgroup. The challenge was to be able to use T-SQL to create palindromes from a list of words. The words would have to be unique, so that the list wasn’t endless. A handful of MVPs (including myself) pushed out potential solutions. All slightly different of course, because of the creativity possible within T-SQL. Itzik posted the results at http://www.sqlmag.com/Article/ArticleID/95008/sql_server_95008.html and it turns out my query was the fastest. Go figure! I’m not sure that Adam (Machanic)  or Steve (Kass) tried to optimise theirs much. I imagine if … Continue reading Palindromic games with the SQL MVPs

Offensive movies on a plane?

I was on a plane recently and saw the new Helen Mirren movie The Queen. It was a well-done film, although in many ways it was just a curiosity about how they would show the events, rather than wondering what would happen next. One thing got me though… I thought at first that there was an occasional problem with the sound, but on the third time I realised what was happening there’s a line when someone says “It was a vow before … ” (I’ve put the dots where the sound cut out). And I realised that they were cutting … Continue reading Offensive movies on a plane?

Two new certifications

Seems I have two new Microsoft Technology Specialist certifications. MCTS: Microsoft Windows SharePoint Services 3.0: Configuration and MCTS: Microsoft Office SharePoint Server 2007: Configuration. The links are to the exams I passed, not the certifications themselves. Seems the cert sites don’t quite exist yet. I sat the exams in November, during the beta period. I got the results in the past week. Seems these two exams each earn you a MCTS certification.

Set-based approach to finding consecutive records

I’m sure I’ve written about this before, but it comes up so regularly in the newsgroups that I thought I’d write an answer here. A table (probably an audit table) exists with a field that stores a date signifying when a change was made. You need to return a result-set which has a row for each period of time between modifications. For example: CREATE TABLE QtyAdj ( …. , ModDate DATETIME, Qty INT ) –where I haven’t listed all the columns – there should obviously be a primary key on this. In fact, I’ll assume there is a field called … Continue reading Set-based approach to finding consecutive records

Powershell script from my SQL presentation

Last week I presented at my user-group about PowerShell and why every DBA should know this. The talk went for just over an hour, and as most of the audience hadn’t used PowerShell at all, I started from the top and really pushed concepts like “You pipe objects not text”. The script can be downloaded from here. So then by the time I got around to talking about the fact that you can really easily hook into ADO and SMO, I think the audience were already caught on the idea that PowerShell really is very powerful and that anything you … Continue reading Powershell script from my SQL presentation

Still looking for the right laptop

Someone suggested I check out the Acer Ferraris. Yeah, seriously. So I checked out the specs. Frustratingly, Acer don’t have them on the their list of products in Australia. The UK Acer site seems to suggest that the F1000 is actually quite well priced (although UK prices on hardware are often quite different to Australian prices). But if Acer aren’t selling them here, then that would make it a little awkward, don’t you think…

In the market for a new laptop

What would you recommend? I want something that will happily run virtual machines without blinking, so that it can be an effective development environment as well as running all the server products I’d care to code against (SQL, WSS, etc). It has to be as good as it needs to be when I present at user-groups or train people. The Dell D820 seems to be quite popular. HP’s nw8440 seems okay, but maybe overpriced? Sony Vaios seem to be much lighter, but is that worth the extra expense? And what about IBM? Love to read your comments… So far I’m … Continue reading In the market for a new laptop

The soapy frog does ASCII Art in PowerShell

Of course the idea is the same as Unix’s AALib, but what’s so cool is how little code it takes to do this in PowerShell. The idea is simply “Load up an image in System.Drawing, work out the brightness of each range of pixels, and from that, give it a character to represent the block of pixels.” So this is me: So I guess the idea is to find cool things to do with PowerShell. AALib is a very cool idea, and that makes this code very cool too.

Dynamic friends list with Whooiz and Ajax

Whooiz is changing. They have a new logo, they’re dropping the capital H (but it might take a bit of time for this one to go through), and the widgets are now much more dynamic. So in my blog (if you’re reading this from elsewhere, go to http://msmvps.com/blogs/robfarley), I now have a much smaller ‘whooiz friendz’ section, and I only show one friend. It’s not that I have offended everyone and only have one friend, because if you watch for a few seconds, you’ll see the friend change to a different (random) friend. This is really nice. It’s something I … Continue reading Dynamic friends list with Whooiz and Ajax

PowerShell and SQL

Because I’ve been playing with PowerShell more and more recently, I’m going to do a talk at my user-group about it next week. Should be a lot of fun, and a great excuse to get deeper into the technology over the weekend. One thing that I think is really great is the ease with which you can apply things to a list, because of the pipe operator – which works just like the pipe operator in any other kind of shell, but actually handles the things as objects. In my example here, it picks up the fact that I’m passing … Continue reading PowerShell and SQL