• Sure, one complete explanation coming right up...  but I'm a bit surprised you didn't figure it out yourself... remember, you asked the question...

    First, I modified your code so we could see the actual character being represented instead of just the ASCII numeric representation....

    declare @i integer

    set @i = 0

    while @i < 256

    begin

     print N'Ascii code : ' + CAST ( @i as varchar) +' '+ CHAR(@I)

       + '   isnumeric : ' + cast (isnumeric(char(@i)) as varchar)

     set @i = @i + 1

    end

    Here's the result set which has been abbreviated as a readability-courtesy to show only those single characters that are considered to be numeric...

    Ascii code : 9     isnumeric : 1

    Ascii code : 10

       isnumeric : 1

    Ascii code : 11    isnumeric : 1

    Ascii code : 12    isnumeric : 1

    Ascii code : 13

       isnumeric : 1

    Ascii code : 36 $   isnumeric : 1

    Ascii code : 43 +   isnumeric : 1

    Ascii code : 44 ,   isnumeric : 1

    Ascii code : 45 -   isnumeric : 1

    Ascii code : 46 .   isnumeric : 1

    Ascii code : 48 0   isnumeric : 1

    Ascii code : 49 1   isnumeric : 1

    Ascii code : 50 2   isnumeric : 1

    Ascii code : 51 3   isnumeric : 1

    Ascii code : 52 4   isnumeric : 1

    Ascii code : 53 5   isnumeric : 1

    Ascii code : 54 6   isnumeric : 1

    Ascii code : 55 7   isnumeric : 1

    Ascii code : 56 8   isnumeric : 1

    Ascii code : 57 9   isnumeric : 1

    Ascii code : 128 €   isnumeric : 1

    Ascii code : 160     isnumeric : 1

    Ascii code : 163 £   isnumeric : 1

    Ascii code : 164 ¤   isnumeric : 1

    Ascii code : 165 ¥   isnumeric : 1

    Ascii 9 is a TAB character and is included because a column of numbers is frequently delimited by a TAB.

    Ascii 10 is a Line Feed character and is included because the last column of numbers is frequently terminated by a Line Feed character.

    Ascii 11 is a Vertical Tab character and is included because the last column of numbers is frequently terminated by a Vertical Tab character.

    Ascii 12 is a Form Feed character and is included because the last column numbers of the last row is sometimes terminated by a Form Feed character.

    Ascii 13 is a Carriage Return character and is included because the last column of numbers is frequently terminated by a Carriage Return character.

    Ascii 36 (Dollar sign), 128 (Euro sign), 163 (British Pound sign), and 164 (Yen sign) are included because they are frequently used as enumerators to identify the type of number or, in this case, the currency type the number is meant to represent.

    Ascii 43 (Plus sign), 44 (Comma), 45 (Minus sign), and 46 (Decimal place) are included because they are frequently included in numeric columns to mark where on the number line the number appears and for simple formatting.

    Ascii 160 is a special "hard space" and is included because it is frequently used to left pad numeric columns so the column of numbers appears to be right justified.  Ascii 32 is a "soft space" and is not included because a single space does not usually represent a column of numbers.  Ascii 32 is, however, a valid numeric character when used to create right justified numbers as is Ascii 160 but a single Ascii 32 character is NOT numeric.  In fact, a string of Ascii 32 spaces is not considered to be numeric but a string of spaces with even a single digit in it is considered to be numeric.

    Ascii 164 is a special character and is included because it is frequently used by accountants and some software to indicate a total or subtotal of some type.  It is also used by some to indicate they don't know what the enumerator is.

    Ascii 48-59 are included because they represent the digits 0 through 9.

    Do notice that the "e" , "d" and (everybody forgot about this) "x" are not included as numeric in the results because a single "e", "d", or "x"  is NOT considered to be numeric.  Two of these letters are for two different forms of scientific notation and the "x" indicates a hexidecimal output in SQL.  Further, when properly formatted, the letters "a-f" are also considered to be numeric and are also not included in the list of single characters.  All of these "unlisted" characters are highly positional in nature.  That is, they must be in the correct position in association with numeric digits and other numeric symbology to be considered to be numeric.  Depending on where they appear in a column of numbers determines if and when they will be treated as numeric or not.

    ISNUMERIC is NOT and should never be treated as ISALLDIGITS.  It was never intended to mean that.  Use the NOT LIKE '%[^0-9]%' regular expression to determine if something ISALLDIGITS... If you try to use ISNUMERIC for that, then you're using it the wrong way.

    Any more questions on ISNUMERIC?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)