• Not really strange as it converts to an int within the IIF before being converted to a bigint.

    I would try a different approach knowing the problems caused by ISNUMERIC[/url].

    CREATE TABLE #TEST( CALL_ANI varchar(10))

    INSERT INTO #TEST

    VALUES

    (''),

    ('1234'),

    ('7048884212'),

    ('ARE56465'),

    ('13656E2');

    SELECT ISNULL(TRY_CONVERT(bigint, CALL_ANI),0) AS ANI

    FROM #TEST

    GO

    DROP TABLE #TEST

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2