469,271 Members | 1,776 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

remove newline character from field in exported table

11
I am trying to export the resultset of a query to a character delimited file. I am using the wizard for this. However, one of the fields is 512 characters long and it accepts from form address. It looks like the field contains newlines, but when i look at the resultset in DB2 i don't see any newline characters, only after i copy it and then paste it to notepad or textpad. When i export the table, this field contains several newline characters.
I am trying to resolve this. I have used tr in unix and it removed some of the newline characters but it does not seem to work. Does anyone have any ideas as how i can remove newlines from the export file?
Thanks.
Jan 26 '09 #1
3 10490
MindBender77
234 100+
I have two questions. First, what is the "new line character"? Is it an actually character? If so, you could possibly do a "Find and Replace". Second, have you tried exporting the file to wordpad (.rtf)?

You could import the text file into say MS Access and remove the characters from there and re-export it back to a text file.


HTH,
Bender
Feb 5 '09 #2
ofilha
11
yes, it is a newline character. The problem is that if i do a search and replace, i will be replacing the newline at the end of the line for the row that was exported and i don't want that. i just want to remove the newline character inside the string in the column. I am considering just doing a perl script for this.
Thanks.
Feb 5 '09 #3
Hi

I used following method

1) export the data in a delimited file.
2) Open the deleimited file using edit plus on windows.
3) the replace the new line character (\n) with nothing

and then import the data.
May 22 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Raquel | last post: by
3 posts views Thread by Fran Zablocki | last post: by
29 posts views Thread by runningdog | last post: by
18 posts views Thread by james | last post: by
2 posts views Thread by John Salerno | last post: by
6 posts views Thread by Daniel Mark | last post: by
9 posts views Thread by Smiley | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.