• Mike Dougherty (4/17/2008)


    If we're looking for obscure/inefficient ways to produce the requested output:

    ...

    I think if we're going to be challenged with writing different SQL, it should be to produce more useful code - not less.

    The alternative is to start an Obfuscated T-SQL contest where entrants have to write an obscure query either to acheive a given result or which people have to work out what it does without actually running it.

    A couple of us (briefly) tried to think of a scenario where the number of characters in the month of a student's date of birth would be significant and hence the query would be appropriate, but couldn't come up with a beleivable one.

    The only idea that came close was printing the dates on certificates (or similar) where someone needed to decide which ones would need to be offset by half a character in order to center them. But it's a very contrived situation.

    Derek