473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

mysql loads newline from flat file

Hi there MYSQL is loading a non printable character at the end of each
row, clearly its a newline or ENTER character.. I have tried
dos2unix.exe, a perl program that converts dos files to unix, etc.
But I dont think I cant remove newline from the file otherwise how
will mysql know what the record separator is ? here is my load
command:

LOAD DATA INFILE 'e:/ETL/john/mergedfile_CELL2.txt' INTO TABLE
mergedfile_CELL1b FIELDS TERMINATED BY 0x1C IGNORE 1 LINES;

How does one resolve this ?

Thank you,

Jack

Mar 28 '07 #1
1 3718
Jack wrote:
Hi there MYSQL is loading a non printable character at the end of each
row, clearly its a newline or ENTER character.. I have tried
dos2unix.exe, a perl program that converts dos files to unix, etc.
But I dont think I cant remove newline from the file otherwise how
will mysql know what the record separator is ? here is my load
command:

LOAD DATA INFILE 'e:/ETL/john/mergedfile_CELL2.txt' INTO TABLE
mergedfile_CELL1b FIELDS TERMINATED BY 0x1C IGNORE 1 LINES;

How does one resolve this ?
Have you looked at the documentation of the LOAD DATA command? I believe
there is a query option to specify the line termination style, at least
there is for the record seperator. Usually for Unix/Linux it's only
'\n', but I believe it could be '\n\r' or '\r\n' for Windows (I'm not
sure if it is the first or the second option for Windows).

Jonathan
Mar 28 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: The Voivod | last post by:
I have the requirements of getting a simple form to output to a db file. Currently I am using a form called ennyform and it outputs to a flat file. The person who want this wants it to be...
1
by: Yun Guan | last post by:
Hello, I have problems installing DBD:mysql on Red Hat Linux 9, either from CPAN, or mannual install. The error is the same, something related to this Kid.pm file under perl. Should I reinstall...
17
by: chicha | last post by:
Hey people, I have to convert MS Access 2000 database into mysql database, the whole thing being part of this project I'm doing for one of my faculty classes. My professor somehow presumed I...
9
by: Nerdlance.com | last post by:
I'm thinking of building a custom website template system. I haven't decided whether to use files or MySQL to store page html data. Is there a performance difference between reading a flat file vs....
3
by: Cynthia | last post by:
Hi all, I know this can be done, but I just can't seem to find a way to do it (that I can use myself, or understand). I use Mac and I've got some databases on my hosting company's MySql server...
3
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when...
1
by: paulq182 | last post by:
PLEASE HELP ME WITH MY CODE?? import java.sql.*; import java.io.*; class min_filmdb_rel_mysql { public static void main (String args ) throws SQLException, IOException {
3
by: Ethan Furman | last post by:
len wrote: I've never had the (mis?)fortune to work with COBOL -- what are the files like? Fixed format, or something like a dBase III style? I
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
0
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...

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.