Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
HI,

SQL
select ISNUMERIC('149972,')

out put:
1

select ISNUMERIC('149972=')


VB
out put:
0


here in first out put it show 1 and second out put it show 0

is it , is also include in int or not

Thanks
ramesh.m
Posted
Updated 18-Nov-12 22:40pm
v2
Comments
MT_ 19-Nov-12 5:33am    
Does the explanation below answers your question?

According to definition on MSDN: "ISNUMERIC returns 1 when the input expression evaluates to a valid numeric data type. Valid numeric data types include the following:
int, numeric, bigint, money, smallint, smallmoney, tinyint, float, decimal, real"

Comma is allowed in Money, hence it is returning 1. It will also return 1 if you +, - £ etc signs in the input.

http://msdn.microsoft.com/en-us/library/ms186272.aspx[^]

Hope that helps. If it does, mark it as answer/upvote.
Thanks
Milind
 
Share this answer
 
ISNUMERIC returns 1 when the input expression evaluates to a valid numeric data type; otherwise it returns 0.
The '=' in the expression makes it a invalid numeric.
 
Share this answer
 
Comments
ramesh4128 19-Nov-12 4:53am    
Please let me know the reason why this special character',' is only accepted as numeric. I tried with all special characters and returned as non-numeric except ','.

Thanks in advance.
MT_ 19-Nov-12 5:00am    
Check details provided in my solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900