0

Firstly, I understand that attempting to do this from MySQL itself is not allowed:

http://dev.mysql.com/doc/refman/5.6/en/stored-program-restrictions.html

When I try to use LOAD DATA INFILE 'c:/data.csv' ... , I get the "LOAD DATA IS NOT ALLOWED IN STORED PROCEDURES".

I am a beginner with moving data around MySQL and I realize this may not be a task it was designed to handle. Therefore, what approach should I use to grab data from a CSV file and append it to a table at a regular time interval? (I have researched a little bit about CRON, but that is for UNIX systems only and we are using a Windows based OS.)

mccoyrjm
  • 142
  • 1
  • 13
  • i had a similar requirement. The way I solved it, Used java code to run a script that runs Load DataIn file command – vishva Mar 26 '15 at 05:01
  • Would this be through developing a java application that would connect to the MySQL database and execute the command that way? – mccoyrjm Mar 26 '15 at 05:22
  • You can run cron job on windows also. Please look in to this link: http://www.waytocode.com/2012/setup-cron-job-on-windows-server/ I found another link: http://stackoverflow.com/questions/24035090/run-cron-job-on-php-script-on-localhost-in-windows – sayani Mar 26 '15 at 05:40
  • Thank you @sayani ; if you post this as an answer, I will select it as the answer to this question – mccoyrjm Mar 27 '15 at 03:13

1 Answers1

0

You can run CRON job on windows also. I have found a couple of links after searching. Please look in to these links:

waytocode.com/2012/setup-cron-job-on-windows-server

http://stackoverflow.com/questions/24035090/run-cron-job-on-php-script-on-localhost-in-windows
sayani
  • 148
  • 8