Hi There.
Is it possible to use the LOAD DATA LOCAL INFILE command from a crontab or what will the best way be of importing a csv on a hourly basis.
Regards
Jump to Postshell> mysqlimport [options] db_name textfile1 [textfile2 ...]
See http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html and particularly, search for a comment about csv files on Windows (which you will want to alter to your specific platform)
shell> mysqlimport [options] db_name textfile1 [textfile2 ...]
See http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html and particularly, search for a comment about csv files on Windows (which you will want to alter to your specific platform)
shell> mysqlimport [options] db_name textfile1 [textfile2 ...]
See http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html and particularly, search for a comment about csv files on Windows (which you will want to alter to your specific platform)
Hi GrisWolf
Figured it out yesterday. Thanks for your help.
mysql -u**** -p**** database --execute="LOAD DATA LOCAL INFILE 'C:\\import.csv' INTO TABLE table FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1, field2, field3)"
Regards
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.