I had below sample data
'1000329',xx,Coi,03-JAN-62 12.00. AM,ORANG
E,2800
i want the data to be in single line
'1000329',xx,Coi,03-JAN-62 12.00. AM,ORANGE,2800
combining multiple lines to single line
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
The above sample data is the one of the record in the resultset obtained from database After formatting the data in textpad i need to save the file as .csv format .Some of the records obtained from resultset are aligned in same line but some records are like above.There are total of 20,000 records like this Editing them manually is taking one day completely
Pls help on this.
Pls help on this.
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
That is not an answer to the question. Only you know what your records look like.
How do we distinguish between complete lines and split ones? Can we tell by the number of commas? Can quoted fields contain commas?
If the incomplete lines are those that contain fewer than 5 commas and if the fields do not contain commas, then this might do what you want. It finds each line containing fewer than 5 commas and removes the newline at the end:
How do we distinguish between complete lines and split ones? Can we tell by the number of commas? Can quoted fields contain commas?
If the incomplete lines are those that contain fewer than 5 commas and if the fields do not contain commas, then this might do what you want. It finds each line containing fewer than 5 commas and removes the newline at the end:
This assumes you are using Posix regular expression syntax:Find what: ^(([^,]*,){0,4}[^,]*)\n
Replace with: \1
[X] Regular expression
Replace All
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax