• Hi,

    Try the switching the order of substring/cast i.e.

    SELECT CAST(SUBSTRING(ID,3,LEN(ID)) AS bigint) AS ID FROM table