to load files into mysql:

create a table:

create table newtable (column1 int(10),column2 varchar(250));

import the data:

load data infile '/path/to/file/file.csv' into table newtable
fields terminated by ',' lines terminated by '\n'



Alia Mikati wrote:

>Hello everybody
>I hope u can help me with this. I want to export tables from excel to 
>mysql and i saved the file as .csv then clicked on browse to get Location 
>of the textfile. But it doesnt work. 
>I get for expl:
>SQL-query :  
>
>"3","Technical"
>"4","Technical"
>"7","Technical"
>"15","Technical"
>"20","Technical"
>"26","Technical"
>"32","Technical"
>
>
>MySQL said: 
>
>
>You have an error in your SQL syntax near '"3","Technical"
>"4","Technical"
>"7","Technical"
>"15","Technical"
>"20","Techn' at line 1
>
>Plz how can I do it?
>Thx 
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


-- 

Richard Dobson
Database Administrator
MRC Bright Study
Clinical Pharmacolgy
St Bartholomew's and the Royal London
School of Medicine and Dentistry
Charterhouse Square
London EC1M 6BQ
Tel: 020-7882-5670
Mob: 07711-522926
Fax: 020-7882-5672
[EMAIL PROTECTED]




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to