Msg 245, Level 16, State 1, Line 2 Conversion failed when converting the varchar value 'F' to data type int.

  • I expect that the following extract will fail, as the max size of INT is 2,147,483,647 (10 Digits).

    Even converting to BIGINT MAY fail, depending on the actual data, as the max size of BIGINT is 9,223,372,036,854,775,807 (19 Digits)

    CONVERT([INT], SUBSTRING([ID_NUM], (3), (20)), (0))

    Then when adding it to 111210000000. are you attempting to do a string concatenation, or are you trying to do addition

  • Are you sure on the length of the id numbers you've provided? I've pulled it apart and it does not have an issue as long as there are 6 numeric digits following the dash. Removing one of the zeros, it does error.

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply