• Hugo Kornelis (11/23/2011)


    [...] Anyway, since I investigated this before answering I can now affirm that this behaviour is explicitly documented in the CAST and CONVERT topic in Books Online.

    Thanks to JestersGrind for an interesting question (got it right by researching before answering as by gutt feeling I'd have also said that none would fail :cool:).

    And a great big thank you to Hugo for the link to BOL.

    In case anyone gets stuck at the conversion table (which indicates implicit conversion between character and numeric data types), keep on reading to find this little comment towards the end:

    SQL Server also returns an error when an empty string (" ") is converted to numeric or decimal..

    PS: Found this blog by Craig Freedman quite interesting.

    -Michael