[SOLVED] Inserting data into a table
Posted: Mon Jun 09, 2008 3:25 pm
Is there a clean why to insert data from a CSV file into a pre-existing MySQL table? I have tried the following:
What I received was data from that process was 57 lines of blanks... imagine my surprise. Is there a better way? I tried it with my phpmyadmin to no avail as well.
Texman
Code: Select all
LOAD DATA LOCAL INFILE 'usr/testdata/importfile.csv'
INTO TABLE testtest
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\r'
(ProdNum, QtyOnHand, Comment);
Texman