Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have flat file with n number of lines and i want to join first 10 lines into one line and next 10 lines into next line. The problem is there is no unique identifier. Please Help.

Thank you
Posted
Comments
anup.bhunia 1-Sep-14 14:50pm    
Could you please elaborate what you mean by special identifier.
Do you mean the new line character (\n) is not fixed for every line of every file?
com-1 1-Sep-14 16:00pm    
Its a fixed Width file with fixed width lines and every record consist of 13th line i need to combine those 13 lines. But i am new to C#.
Sergey Alexandrovich Kryukov 1-Sep-14 15:19pm    
If a flat file, lines are separate with the end-of-line character(s), but they depends on platform. You can write the code which works with all formats. There is nothing else you would need.
—SA
com-1 1-Sep-14 16:02pm    
Thanks, but i am new to C# and i need to use SSIS script component to do this.

1 solution

Please see my comment to the question. You can write code working for all platforms. All you need to know is this: http://en.wikipedia.org/wiki/Newline[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900