syscomments

RocketScientist's Miscellaneous Ramblings
posts - 76, comments - 354, trackbacks - 3

IsNumeric('.')

So, anybody know why if you do this:

print IsNumeric('.')

it prints out this:

1


Seems that it won't convert to a float, it won't convert to an int, but it will throw lots of great errors.....

Print | posted on Tuesday, March 01, 2011 5:08 PM | Filed Under [ KCTechBlog Syndication ]

Feedback

Gravatar

# re: IsNumeric('.')

Try converting is to money
3/2/2011 8:15 AM | Mike
Gravatar

# re: IsNumeric('.')

I commented on this yesterday! Try converting it to data type money.
3/3/2011 8:04 AM | Mike
Gravatar

# re: IsNumeric('.')

Yeah, that works. It's dumb, incredibly dumb, but it works.

So you can do this:

select isnumeric('.')
and you get 1.

You can also do:
select convert(float, convert(money, '.'))

and get 0 out.

Wow, that's just really really stupid.
3/3/2011 10:06 AM | chrism
Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET