473,549 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

remove newline character from field in exported table

11 New Member
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 11214
MindBender77
234 New Member
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 New Member
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
nsarda2
3 New Member
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

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

Similar topics

163
14530
by: Shiperton Henethe | last post by:
Hi Know any good utilities to help me strip out the tags that Microsoft Excel 2002 leaved behind when you try and export an HTML format file? This is driving me NUTS. And really makes me hate microsoft with a passion. I literally just want "compact HTML" - ie just the data,
4
11486
by: Raquel | last post by:
Could someone explain to me what the reason is for having a character delimiter (which is double quotes by default) for performing Loads/Imports on UDB? I would think that column delimiter along should have sufficed (of course it is the responsibility of the person performing the Load to ensure that the character he has chosen as column...
3
4869
by: Fran Zablocki | last post by:
I have a process that exports an Access table to a comma-delimited text file. One of the fields that is exported shows the date it was exported, using the Date() function. In the Access table, the date appears in the records in mm/dd/yyyy format, but after exporting, the date appears as mm/dd/yyyy 0:00:00. For example, today is 11/06/2003. It...
29
3421
by: runningdog | last post by:
Hi, I would like to be able to embed a newline in a text string. Is there any convienent notation to do this TIA Steve
18
4599
by: james | last post by:
Hi, I am loading a CSV file ( Comma Seperated Value) into a Richtext box. I have a routine that splits the data up when it hits the "," and then copies the results into a listbox. The data also has some different characters in it that I am trying to remove. The small a with two dots over it and the small y with two dots over it. Here is my...
2
5661
by: John Salerno | last post by:
If I read a string that contains a newline character(s) into a variable, then write that variable to a file, how can I retain those newline characters so that the string remains on one line rather than spans multiple lines? Example: In a CGI script, I'm reading the address field from an HTML form. Almost always the person will press ENTER...
6
18393
by: Daniel Mark | last post by:
Hello all: I have the following snippet: In : fileName = 'Perfect Setup.txt\n' In : fileName = fileName # remove the '\n' character In : fileName Out: 'Perfect Setup.txt'
9
3989
by: Smiley | last post by:
Hi, Can someone tell me how to remove aspostophe (') from user input. I don't want to give any error message. Just want to remove or change it to "" or null, such input when it appear anywhere on a specific field. e.g. if user input abcd's. I want the final data on the database be look like abcds or abcd s MSAccess 2000
3
2532
by: skris | last post by:
Hi All, I have some contents in a file named Msg.txt. I need to append the date right after the end of every line of that file. I tried out this code, but it did not work. >>> import datetime >>> f = open('C:\Python25\Msg1.txt', 'r') >>> y = datetime.datetime.now().strftime("%d%b%y") >>> for lines in f: ... z = lines, y ... ...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7469
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5087
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.