Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Browse by Tags · View All
SQL server 7
Database 6
Tips 5
Tricks 5
#SQLServer 3
Backup 2
MSSQL 1
'E0' 1
isnumeric 1
Issues 1

Archive · View All
December 2011 4
March 2012 2
January 2012 1

Raghunath Bhandari's Blog

Issue with ISNUMERIC

Mar 20 2012 9:42PM by Raghunath Bhandari   

Today my friend asked me that ISNUMERIC function is not working properly.  I checked, the issue was with some special char, might be MSSQL will improve this functionality in coming versions. For now, if we change the way of calling, it will show you the correct result.

 

These conditions shows wrong result:

SELECT ISNUMERIC(CHAR(9)) -- TAB CHAR
SELECT ISNUMERIC('-1,2,3,4,56,789') --NON MONEY
SELECT ISNUMERIC('12222D3') --NON NUMERIC WITH ALPHA CHAR

Results:

-----------
1

(1 row(s) affected)


-----------
1

(1 row(s) affected)


-----------
1

(1 row(s) affected)




The solution is:

SELECT ISNUMERIC(CHAR(9)+'E0')
SELECT ISNUMERIC('-1,2,3,4,56,789'+'E0')
SELECT ISNUMERIC('12222D3' + 'E0')

Result:

-----------
0

(1 row(s) affected)


-----------
0

(1 row(s) affected)


-----------
0

(1 row(s) affected)

MSDN:
"Note this still doesn't guarantee you will be able to convert the number to a float without the second ISNUMERIC(value + 'e0') test included to weed out values where there are more than one period or multiple hyphens."

Tags: SQL server, Tricks, Tips, Isnumeric function, Issues, isnumeric, 'E0', MSSQL,


Raghunath Bhandari
183 · 1% · 253
4
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"Issue with ISNUMERIC" rated 5 out of 5 by 4 readers
Issue with ISNUMERIC , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]