Wednesday, March 21, 2012

Interesting isNumeric result

Does anyone else get the following result when running this query?

Select isnumeric('4D7')

--

1

(1 row(s) affected)

Does anyone know why this would return true for numeric?

Thanks,

Ray

That is another representation of 4.0E+7 -or 40000000.0, and is, therefore, a valid numeric.

You may find this article useful.

isnumeric -What is wrong?
http://www.aspfaq.com/show.asp?id=2390

|||Yeah, IsNumeric is pretty horrible. Vote here for a change https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=177308

No comments:

Post a Comment