Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: perl DBI LOAD DATA INFILE

by Anonymous Monk
on Oct 14, 2013 at 04:28 UTC ( #1058124=note: print w/ replies, xml ) Need Help??


in reply to perl DBI LOAD DATA INFILE

To import the datafile, first upload it to your home directory, so that the file is now located at /importfile.csv on our local system. Then you type the following SQL at the mysql prompt:

LOAD DATA LOCAL INFILE '/importfile.csv' INTO TABLE test_table FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1, filed2, field3);


Comment on Re: perl DBI LOAD DATA INFILE
Download Code
Re^2: perl DBI LOAD DATA INFILE
by nickd (Initiate) on Oct 14, 2013 at 12:12 UTC

    Hi, I will need to upload multiple files daily hence am trying to script it using perl. I cannot use manual upload at the command prompt.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2015-07-05 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (67 votes), past polls