Suitable Data Type for Decimal in SSIS

jn93 671 Reputation points
2022-11-22T09:11:30.647+00:00

Hi All,

I have SSIS package export from SQL table into CSV file. After export, as shown below some of the data in CSV file is not same as per SQL table. Upon checking the data type in output column EXCESS at advanced editor of source, it is in NUMERIC. Any suitable data type to ensure I got the same in CSV?

262955-image.png

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
{count} votes

Accepted answer
  1. Yitzhak Khabinsky 26,586 Reputation points
    2022-11-22T13:38:18.497+00:00

    Hi @jn93 ,

    You can use a Derived Column Transformation for your goal.
    Please try the following expression:

    Excess < 1 ? "0" + (DT_WSTR,6)Excess  : (DT_WSTR,6)Excess  
    

1 additional answer

Sort by: Most helpful
  1. ZoeHui-MSFT 41,491 Reputation points
    2022-11-23T01:42:32.873+00:00

    Hi @jn93 ,

    Like YitzhakKhabinsky-0887 said that you may use a Derived Column to change the format of the value.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.