Single row of data broke into 3 rows while exporting data from SQL Table to Flat File

Friends,

I have a simple SSIS package which exports a table data to flat file. In the table all together I have 2000 rows and while I export it to the flat file it becomes 2002. What I found from the result is there is a row which has around 5 blank spaces in between the data and the same row broke into 3 different rows with most of the data at first row, 2nd row blank and few data went to 3rd row. I removed  the spaces in my test table and run the same package and it worked completely fine. But the thing is the actual data in the table comes from the different source ( application) and may be the application require these spaces in their end so that they put spaces between the data. So, Is there any option that I can do with SSIS or Flat file property to get this problem solved?

Thanks in advance.


August 29th, 2015 3:01pm

Hi Prasant,

It seems that the breakage occurred actually due to the presence of the CRLF (line termination control characters).

It actually could be LF or CR depends on platforms.

To make sure use an editor that can detect these special characters. For example EmEditor, or Notepad++ can when you enable show all characters.

You have an option to yank them, say in a Derived Column Transformation using REPLACE (AColumn ,"\r\n","")

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 11:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics