Incorrect Format In Flat File CSV File

jn93 651 Reputation points
2022-08-19T03:45:21.587+00:00

Hi I have SSIS package take source from DB to flat file Destination. However, the format I get in CSV file for REFERENCENO is in general and I try to convert the data type to text or numbers is still getting wrong (seems like data missing when convert to numbers). Apart from that, I also try do data conversion from string to text in ssis package, still didnt get the correct format in CSV. Anyone can please help? Please refer the image below for better overview of my problem.

232580-image.png

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

Accepted answer
  1. ZoeHui-MSFT 32,401 Reputation points
    2022-08-19T06:27:58.08+00:00

    Hi @jn93

    You can add a apostrophe in front to force Excel to show it as text instead of a numeric value.

    Use SSIS Derived Column Transformation with below expression:

     "'" + <yourColumnName>  
    

    232695-image.png

    Or you may open the csv file with notepad, it will not show the Incorrect Format.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


1 additional answer

Sort by: Most helpful
  1. Imran Rauf 1 Reputation point
    2022-08-19T04:27:23.05+00:00