Home Forums SQL Server 7,2000 T-SQL Conversion failed when converting the varchar value '12.80' to data type int. RE: Conversion failed when converting the varchar value '12.80' to data type int.

  • you'll have to show us the procedure; the error itself is not descriptive enough to point out anything obvious.

    the onlything i can offer is that if you are storing that decimal as a varchar, you'll have to double convert i think;

    this returns the exact error you described:

    select CONVERT(int,'12.80')

    Msg 245, Level 16, State 1, Line 1

    Conversion failed when converting the varchar value '12.80' to data type int.

    select CONVERT(int,CONVERT(decimal(19,2),'12.80'))

    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!