Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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: (11)
As of 2014-07-10 16:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (213 votes), past polls