forums › forums › SQLyog › Using SQLyog › CSV import
- This topic is empty.
-
AuthorPosts
-
-
June 23, 2003 at 8:57 am #8053amarone88Member
Hi everybody.
I'm trying to import data from a CSV file created by a Macintosh FileMaker.
Separator is the classical comma (,), columns are enclosed by ” and records are terminated by n (my text editor, NoteTab Light, identifies int as ^P). I set parameters in the dialog windows as required and it seems they are correct. It works, but SQLYog imports only the first record and then stops!
MySQL version is 4.1.0-alpha-max-nt, running on Windows 2000 Professional SP3.
Here there is the SQL command:
load data local infile 'D:/sviluppo/timesheet/gfm.csv' into table `sttimesheet`.`gfm` fields escaped by '\' terminated by ',' enclosed by '”' lines terminated by 'n' ( field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11)
Is there something more I must do to mare it import all the records?
Thx
Iacopo
-
June 23, 2003 at 9:41 am #14558ShadowMember
Perhaps the end-of-line character (/n) is not reconized properly. Convert the CSV file, then retry importing.
-
June 23, 2003 at 10:14 am #14559amarone88Member
Even the command line gives me the same problem, it seems not to be a SQLyog bug =___=''
What do you mean by converting the CSV file? Into what should I convert it? O.O''
Thanks
I tried operning the CSV with Microsoft Word and it shows the new line character properly.
Some other elements: I first had my CSV with every line terminating with n but the last column was not followed by a comma. This way, the command imported only the first line anyway, but the last column was followed by the first column of the second record:
2/01/2003 – TV – H – LS – 60 – – – – S/AGGIORNAM/RICERCA Articoli vari arretrati – AI””2/01/2003
(AI””2/01/2003 is the last imported column, as you can see the date should be the first column of the second record. Here I separated columns by -)
-
June 23, 2003 at 10:44 am #14560amarone88Member
Ok, problem solved. It was due to a wrong character that Macintosh FileMaker added at the end of the line.
I deleted it with a text editor and now all works fine.
Thanks, bye ^____^
-
-
AuthorPosts
- You must be logged in to reply to this topic.