MySQL Forums
Forum List  »  Other Migration

import from excel to mySql
Posted by: shafir m
Date: September 05, 2008 07:30AM

hi

i can use some help...

i have an excel (cities) spreadsheet with 3 columns:
1.name
2.city_id
3.region_id
(i have like 50000 records in this spreadsheet)

i built a clean table in mySql with the following fields:
1.id (auto-increment)
2.name (varchar)
3.city_id (int)
4.region (int)

i tried to copy with that line:
LOAD DATA INFILE 'path of the txt file i saved' INTO TABLE cities

and all i got is NULL records
i think the problem is with the "auto increment" field.
but i need it and i dont know what to do.

thanks alot in advanced :)
shafir.

Options: ReplyQuote


Subject
Views
Written By
Posted
import from excel to mySql
8561
September 05, 2008 07:30AM
4063
December 12, 2008 02:50AM
3771
December 23, 2008 03:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.