Click here to Skip to main content
12,623,511 members (27,523 online)
Rate this:
 
Please Sign up or sign in to vote.
HI,

select ISNUMERIC('149972,')
 
out put:
1
 
select ISNUMERIC('149972=')

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 18-Nov-12 23:39pm
Updated 18-Nov-12 23:40pm
v2
Comments
Milind Thakkar 19-Nov-12 5:33am
   
Does the explanation below answers your question?
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
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.
Milind Thakkar 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161128.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100