如何在SQL中的IsNumeric()函数中避免使用Speacial字符 [英] How to Avoid Speacial Characters in IsNumeric() function in SQL
本文介绍了如何在SQL中的IsNumeric()函数中避免使用Speacial字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我发现了ISNUMBERIC的问题。
SELECT ISNUMERIC(' 1010')---> 1:确切地说
SELECT ISNUMERIC('10C0')---> 0:确切地说
SELECT ISNUMERIC('10E0')---> 1:错误
SELECT ISNUMERIC('10,0')---> 1:错了
为什么? E和Speacial Char出现时有什么问题吗?
谢谢
Hi everyone,
I find out the problem with ISNUMBERIC.
SELECT ISNUMERIC('1010') ---> 1: exactly
SELECT ISNUMERIC('10C0') ---> 0: exactly
SELECT ISNUMERIC('10E0') ---> 1: wrong
SELECT ISNUMERIC('10,0') ---> 1: wrong
Why? Is there something wrong when E and Speacial Char appear?
Thanks
推荐答案
10E0是一个指数形式一个数字。 10 * 10 ^ 0.这是一个有效的数字
10,0可能是在SQL Server视图中由千分隔符分隔的数字。还请注意,在某些语言环境(例如法国)中,逗号是小数点分隔符
10E0 is an exponent form of a number. 10 * 10 ^ 0. It is a valid number
10,0 is perhaps in SQL Server view a number separated by a "thousands" separator. Please also note that in some locales (e.g. France) comma is a decimal point separator
只是看到这个 ISnumeric [ ^ ]功能,
留意备注部分中的备注
just see this ISnumeric[^] Function,
keep an eye of the Notes in the remark section
这篇关于如何在SQL中的IsNumeric()函数中避免使用Speacial字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文