Tests whether a string argument can be converted to a numeric.
If a conversion is possible, the function returns 1; otherwise, it returns 0. If the argument is null, 0 is returned.
Parameter |
Description |
---|---|
string |
The string to be analyzed to determine whether the string represents a valid numeric value |
INT
For optimal performance, avoid using ISNUMERIC in predicates, where it is processed by the SQL Anywhere portion of the product and cannot take advantage of the performance features of Sybase IQ.
The following example tests whether the height_in_cms column holds valid numeric data, returning invalid numeric data as NULL, and valid numeric data in int format.
data height_in_cms ------------------------ asde asde 180 156
select case when isnumeric(height_in_cms)=0 then NULL else cast(height_in_cms as int) end from MyData