|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:31 AM
Points: 65,
Visits: 443
|
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Thursday, May 09, 2013 1:37 PM
Points: 649,
Visits: 60
|
|
There is simpliest way to found non numeric symbols in string: ..... if patindex('%[^0-9]%',@s)>0 set @value=0 ....
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: 2 days ago @ 12:28 PM
Points: 675,
Visits: 2,031
|
|
For character type strings you expect to be integers, there's also
ISNUMERIC(RTRIM(@value) + '.0e0')
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:31 AM
Points: 65,
Visits: 443
|
|
| I think everyone is totally missing the point that the IsNumeric function succeeds on junk that will fail when you later do a cast. Do your suggestions handle the strange cases in the comments at the top of my IsBigInt function?
|
|
|
|