You can see this post on the Forum. The original Article is as follows:
On My SQL Server R2, I tried it. As a result, an error is returned when it is converted to numeric ..
It seems strange that the returned value of isnumberic is 1, but the conversion fails. Why?
I checked the BOL and found the following explanation:
The isnumberic function determines whether an expression is of any of the following types:
IntReal
Numeric bigint
Money smallint
Smallmoney tinyint
Float decimal
Isnumberic not only determines whether it is of the numberic type, but also determines whether it is of other types such as money.
After converting to the money type, no error is returned. The statement is as follows:
Select cast ('2014 4 'as money );
In addition, if the $ symbol is available, the conversion is successful. The statement is as follows:
Select isnumeric ('$123 ');
Select cast ('$123' as money );
To sum up, this is not a SQL Server bug, but it is easy for usersNumbericI think that the expression 1 returned by this function can be converted to the numberic type. In fact, it can be converted to the money type but not the numberic type. isnumberic determines that 1 is returned.