MIDRANGE dot COM Mailing List Archive



MIDRANGE-L » January 2013

Re: SQL is numeric function



On Tue, Jan 15, 2013 at 11:56 AM, Birgitta Hauser
<Hauser@xxxxxxxxxxxxxxx> wrote:
No, you only can check for numeric values by translating all digits (and
Decimal Point) into *Blanks and checking whether the string is not *Blank.

This is a nice and simple method for "well behaved" data, but has
limitations. For example, it will also consider '123.4.5.6' and '12
.3 4....' to be numeric values. It also doesn't handle negative
numbers or scientific notation, which may or may not be relevant.

The lack of an IsNumeric function is a common complaint. See this
article for more information:

http://www.itjungle.com/fhg/fhg100808-printer02.html

tl;dr: Create a UDF. You'll probably need it over and over again
anyway, so in the long run you'll be glad you did.

John





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2013 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact