Following on from my previous post, I’m rapidly reaching the conclusion that the CASE statement is, well, a little bit touchy.
First off, here’s a quick recap or you can have a look here. (more…)
Posts Tagged ‘coalesce’
Basket Case – CASE statement in SQL
July 12, 2010More Nefarious Nullable Nonsense – Coalesce
July 8, 2010OK so it’s not really nefarious but I couldn’t think of another word beginning with “N”.
You may also be relieved to know that this is the dying parp of the vuvuzela on this blog.
This is really just a bit about coalesce – a little used but extremely useful SQL function.
Let’s get the World Cup example out of the way. Here’s a table containing details of the four semi-finalists from this year’s tournament.
Conveniently enough, they consist of two previous winners, one with a best performance as beaten-finalists, and one with a previous best of 4th. Too good an opportunity to miss…. (more…)