• brewmanz (11/24/2008)


    I'm glad that this QOTD caused some deep thinking. It was prompted by a real-life problem, although it wasn't as constrained as I made it. The original input field was VARCHAR255) and failing on convert to INT when it had about 30 digits. The code was so bad that most would have seen the potential flaws. On playing with a way to fix it, I realised how (just about) useless ISNUMERIC is.

    What's the proper solution? I haven't actually worked that out! LOL

    I like writing QOTD (okay, I've only done 2 so far!) where you can't easily cheat by just paste-and-go (like, umm, the author has been know to do).

    I'm working on another one using date formats. Sadly, I have to work for a living so progress isn't as quick as I would like. Still, watch this space!

    Regards

    Brewmanz

    Definitely one of the better QOTD. The type of teh case statement was obviously wrong but easily fixable by changing the line marked (A), so it would be easy to go for the wrong answer without thinking about the real meaning of isNumeric. And thd explanation of teh anser is clear and correct. I liked this one very much.

    Tom