sasori Posted August 24, 2008 Share Posted August 24, 2008 i have 3 tables - customer - order - orderitem inside customer table it has these columns -cust_id -fname -lname -street -city -state -zip -phone -fax -email then i created a customer.txt file and has contents like ,freddy,kruger,elm street,angels,CA,20204,000-000-000,,fkruger@test.com,,, ,albert,einstein,geek street,carlson,MA,23251,000-000-000,,aeinstein@test.com,,, i placed this customer .txt file in my c:\wamp\www\webapp\ directory then i tried the command in my mysql console LOAD DATA INFILE "c\wamp\www\webapp\customer.txt" INTO TABLE "customer"; but it doesn't work at all, what should i to ? ??? i even tried to replace the double quotation mark with back ticks or replace the backslash into forward slash..and still it won't work. Quote Link to comment Share on other sites More sharing options...
Hooker Posted August 24, 2008 Share Posted August 24, 2008 LOAD DATA LOCAL INFILE "c:\wamp\www\webapp\customer.txt" INTO TABLE "customer"; Quote Link to comment Share on other sites More sharing options...
sasori Posted August 24, 2008 Author Share Posted August 24, 2008 LOAD DATA LOCAL INFILE "c:\wamp\www\webapp\customer.txt" INTO TABLE "customer"; i found another way and it worked just fine LOAD DATA INFILE 'c:/wamp/www/webapp/customer.txt' INTO TABLE customer FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; thanks for the help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.