forums › forums › SQLyog › Using SQLyog › CSV Import
- This topic is empty.
-
AuthorPosts
-
-
July 1, 2003 at 11:42 am #8077David L MorrisMember
Hi – my first post.
I am testing a CSV import from a file with records terminated by CRLF and is like:-
1001,”Direct Advertiser”
1003,”Mediaedge:cia (VIC)”
The table schema is ID bigint and name char(50)
The imported records retain the quote characters and appear to have a non print character at the end of the name field. This I don't want. I am using the latest version downloaded for trial two days ago.
Could I have a guide as to how I should set the import properties to get it right please?
-
July 1, 2003 at 2:25 pm #14619ShadowMember
Fields terminated by: ,
Fields OPTIONALLY enclosed by: “
Lines terminated by: n
Escaped by: \
This is it. The problem is that certain applications use different EOL characters, so the import may handle the line breaks incorrectly.
-
July 1, 2003 at 10:09 pm #14620David L MorrisMember
Sorry Shadow, I tried your suggestion, but when I select:-
Fields OPTIONALLY enclosed by: “
I import one record which still has quotes. Here is the display after the import and F5:-
3006 “Boots Healthcare Australia P/L” 3007,”Advanced H
Using XTREE to display the csv file in Hex, I can see the EOL is the normal hex 0D0A
I have over 70K records to import from a larger CSV and I would dearly like to get the import to work
as the speed of import is great. I have attached a similar CSV file if it would help.
-
July 2, 2003 at 5:22 am #14621RiteshMember
Seems there is some problem with the attachment.
Can you mail us the table structure and a sample CSV file so that we can work on it.
You can mail them to [email protected]
-
July 2, 2003 at 9:58 am #14622David L MorrisMember
Thanks for the offer Ritesh, however, after scanning the MySQL Manual in the nine pages covering LOAD DATA INFILE Syntax, I changed my LINES TERMINATED BY 'n' to 'rn', set the fileds enclosed by ” Optionally and the imports of all my csv files worked perfectly.
I have about 28 days to go on my trial, but I think you can count on a sale.
Regards
David
-
July 2, 2003 at 1:18 pm #14623RiteshMember
Great 😀
-
-
AuthorPosts
- You must be logged in to reply to this topic.