• The easiest way, as for me, would be creating a scalar function which whoud accept a string as a parameter and return a numeric value.

    Function should parse the string and calculate the valuse according to arithmetic rules.

    Function will also bring an advantage of some validation to be performed prior to calculation to prevent run-time errors.

    Then the final code would look like this:

    INSERT INTO TableNum

    (ID, NumColumn)

    SELECT ID, dbo.CalcFunction (StrColumn)

    FROM TableStr

    _____________
    Code for TallyGenerator