• Mr. Popki nailed it;

    your excellent error message shows the value 2012061414297 is being inserted into a table;

    that value is larger than the max of an int:

    select 2012061414297

    select convert(int,2012061414297)

    (1 row(s) affected)

    Msg 8115, Level 16, State 2, Line 2

    Arithmetic overflow error converting expression to data type int.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!