|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 9:52 AM
Points: 2,796,
Visits: 1,125
|
|
Christian Buettner (8/10/2009)
Hi Kevin, I think that is not true. Try select isnumeric('$$') for example. It will evaluate to false, although this character ($) was no issue in your previous example. The reason why your example is returning true, is probably the fact that it can be cast to (small)money.
My mistake. Thanks for pointing this out. I always thought this function just didn't work properly. Now I see I just didn't understand it's purpose. Any idea why Microsoft didn't implement ISMONEY() ISINT() or ISFLOAT()? ISNUMERIC() seems almost useless for testing before an insert.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: 2 days ago @ 6:12 AM
Points: 2,526,
Visits: 3,620
|
|
That is actually a good question and unfortunately I have no idea
Best Regards,
Chris Büttner
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Tuesday, August 18, 2009 3:23 AM
Points: 309,
Visits: 58
|
|
| ISNUMERIC() checks whether the input is valid numeric data, that also includes money data type, thats why it used to return 1 for isnumeric('0,.0') cause its a valid money type. On the other hand integer data type is limited to numbers only...
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,232,
Visits: 1,046
|
|
"Conversion failed when converting the varchar value '0,.0' to data type int." No SQL product that I could find returned "error converting to a numeric" when trying to convert a varchar value to Int.
Why make the correct answer wrong? Are you practicing up to write certification exam questions where the least wrong answer is the right one?
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Friday, January 11, 2013 12:41 PM
Points: 621,
Visits: 297
|
|
|
|
|