none
"Error: Arithmetic overflow error converting float to data type numeric."

    Question

  • I am tryin g to insert some data into audit_table in sql. (source_col_sum, destination_col_sum etc) In ssis i have declared two variables for paticular these two columns with data type 'Object'(source database: Informix, Destination: SQL server 2008). I have created Execute SQL task and mapped these two parameter with object type DOUBLE(Source_col_sum) and NUMERIC (dest_col_sum).

    This package runs fine for other tables but one giving error "Error: Arithmetic overflow error converting float to data type numeric."

    I tried mapping other datatypes but got similar error.

    Can someone please help me?
    Thursday, February 18, 2010 7:28 PM

All replies

  • Hi,
    you can't cast your DOUBLE(Source_col_sum) to NUMERIC (dest_col_sum). please try to convert to double to double.
    Let us TRY this | Don’t forget to mark the post(s) that answered your question

    http://quest4gen.blogspot.com/
    Thursday, February 18, 2010 7:41 PM
  • Hi

    I think my question was not clear.

    Source_col_sum and dest_col_sum are two columns in destination. I am not casting source to destination.

    So now what should I do?
    Thursday, February 18, 2010 8:24 PM
  • With a NUMERIC type, you have to define precision and scale. It sounds like the value yu are generating from that column is larger than the precision and scale will handle. Try increasing the size of the NUMERIC.
    John Welch | www.varigence.com | www.agilebi.com | ssisUnit.codeplex.com
    Thursday, February 18, 2010 8:31 PM
  • Hi

    value of source_col_sum = 1789694660.1 and data type for that column in destination is decimal(15,7)

    value of source_col_sum = 1700906495.0 and data type for that column in destination is decimal(15,7)

    value of source_col_sum = 1771227661.7 and data type for that column in destination is decimal(15,7)

    value of source_col_sum = 1809940565.8 and data type for that column in destination is decimal(15,7)

    same values for dest_col_sum with same data type in destination (sql)

    but still pblm

    is this ok??







    Thursday, February 18, 2010 8:36 PM
  • Hi

    value of source_col_sum = 1789694660.1 and data type for that column in destination is decimal(15,7)

    value of source_col_sum = 1700906495.0 and data type for that column in destination is decimal(15,7)

    value of source_col_sum = 1771227661.7 and data type for that column in destination is decimal(15,7)

    value of source_col_sum = 1809940565.8 and data type for that column in destination is decimal(15,7)

    same values for dest_col_sum with same data type in destination (sql)

    but still pblm

    is this ok??








    try decimal(15,3). or decimal(18,7)
    if you want 7 values after decimal then you have to increase the size. try to play with below code
    declare @number as decimal(18,7)
    set @number=1789694660.1
    
    select @number

    let us know your observation

    Let us TRY this | Don’t forget to mark the post(s) that answered your question

    http://quest4gen.blogspot.com/
    Friday, February 19, 2010 12:20 AM