forums › forums › SQLyog › Using SQLyog › How To Use Csv Import?
- This topic is empty.
-
AuthorPosts
-
-
September 4, 2006 at 6:03 pm #9834JustMember
Hello all!
First please 'scuse my bad english: I'm french :x.
I just downloaded and installed SQLyog which seams to be a fabulous MySQL front end [before that I use MySQL Front].
I'm looking for some example about CSV file.
I don't know at all how to use it . So I have two questions:
– How I must prepare the SQL table which will receive the information from the CSV file?
– And so, how I could configure the CSV import for a CSV file which look like that [three first lines of the file]:
Code:Commune;Codepos;Departement;INSEE
L ABERGEMENT CLEMENCIAT;01400;AIN;1001
L ABERGEMENT DE VAREY;01640;AIN;1002
AMAREINS;01090;AIN;1003NB: that's a zip code file about French Town 😉 “Commune” is the town, “Codepos” is the Zip Code, “Departement” is the country and “INSEE” is an ID for a nationnal institute.
Thanks for future answer!
-
September 4, 2006 at 6:56 pm #22237peterlaursenParticipant
We have a FAQ on CSV-import: http://www.webyog.com/faq/28_73_en.html.
In advance you must create a table with the columns 'Commune', 'Codepos', 'Departement' and 'INSEE' of appropirate type.
With these data it would be easiest to 'fill Excel-friendly values' and next edit these two:
'delimited by' is SEMICOLON (Continental European EXCEL CSV-format!)
'enclosed by' is LEFT EMPTY/UNCHECKED
'escaped by' most likely does not really matter here – let it be as \
'lines terminated by' is 'rn' (maybe you know it as
– it is just another way of expressing the same thing!) if file is generated on Windows and only 'n' if generated on Linux/Unix. AT THE BUTTOM you enter “1” so that the header line is not read as data, but skipped.
the only issue that I could foresee here is if you have a ';' (semicolon) in some of your data. That is what escaping is for then. But most likely you don't!
-
September 4, 2006 at 7:41 pm #22238JustMember
Thanks a lot for your quick answering!
I try it tomorow and give you a feedback!
See You!
EDIT:
feedback > It's OK! Thanks so much ^^!
-
-
AuthorPosts
- You must be logged in to reply to this topic.