SSIS decimal conversion working funny

  • Hi Experts,

    We are converting the float value into decimal(38,10) and inserting in a destination text file.
    In Source Database = 9.61
    After converting in T-SQL query using decimal(38,10) = 9.6100000000
    Final output in text file = 9.6099999999999994
    No Transformation is happening in SSIS.
    What's is the solution to this ?
    Please help and let me know if you need any more info.

    Thank you

    BI Developer
    SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
    Please visit... ApplyBI

  • Taking in consideration what the output is I do not believe that you are doing a convert to decimal 38,10 on source, neither is the output defined with the same number of decimals.

    Should you do
    select convert(decimal(38, 10), field) .. from tablex... on your dataflow source the output will be different and will be limited to the desired number of significant decimal digits on the output (could have more if  you define the output with more decimal places but those will  be zeros unlike the output you gave us.)

  • In SSIS, the data type for this column is DT_NUMERIC is that causing the problem?

    BI Developer
    SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
    Please visit... ApplyBI

  • H4K - Thursday, August 2, 2018 6:12 AM

    In SSIS, the data type for this column is DT_NUMERIC is that causing the problem?

    What precision are you using for the dt_numeric column?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • can you post the sql you using as your source on the dataflow mentioning which column is giving you the undesired result.

  • Phil Parkin - Thursday, August 2, 2018 11:29 AM

    H4K - Thursday, August 2, 2018 6:12 AM

    In SSIS, the data type for this column is DT_NUMERIC is that causing the problem?

    What precision are you using for the dt_numeric column?

    same. Precision =38 and Scale=10

    BI Developer
    SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
    Please visit... ApplyBI

Viewing 6 posts - 1 through 5 (of 5 total)

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