This is a discussion on Import from an excel file within the MySQL forums, part of the Database Server Software category; --> Hi .... How can I import some columns of an excel file in some fields in a remote MySQL ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi .... How can I import some columns of an excel file in some fields in a remote MySQL table?? I've tried with PhpMyAdmin but when I select a CSV file I obtain: query SQL: id; Messaggio di MySQL: Documentazione #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'id' at line 1 Can you tell me solution for import my fields.... with an easy and simple solution? Thanks |
| |||
| Sarah wrote: > Hi .... How can I import some columns of an excel file in some fields > in a remote MySQL table?? > > I've tried with PhpMyAdmin but when I select a CSV file I obtain: > > > query SQL: > > id; > > Messaggio di MySQL: Documentazione > #1064 - You have an error in your SQL syntax; check the manual that > corresponds to your MySQL server version for the right syntax to use > near 'id' at line 1 > > > Can you tell me solution for import my fields.... with an easy and > simple solution? > > Thanks I generally use Excel formulas to create the relavant INSERT statements and them run those |
| ||||
| On Jul 5, 1:42*pm, Sarah <nom...@nomail.it> wrote: > Hi .... How can I import some columns of an excel file in some fields in > a remote MySQL table?? > > I've tried with PhpMyAdmin but when I select a CSV file I obtain: > > query SQL: > > id; > > Messaggio di MySQL: Documentazione > #1064 - You have an error in your SQL syntax; check the manual that > corresponds to your MySQL server version for the right syntax to use > near 'id' at line 1 > > Can you tell me solution for import my fields.... with an easy and > simple solution? It's trivial to import CSV or tab-delimited data into MySQL, for example: LOAD DATA INFILE 'file.csv' INTO TABLE tbl FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' (list,your,columns,here) The file must be accessible to the MySQL server (i.e. it should be copied to the server). Use the CLI client, avoid PHPMyAdmin and you should be fine. > > Thanks |