I have a case to import data into mysql automatically every 6pm. data to be imported is "data.txt".
I created in mysql like this:
CREATE EVENT EVENT_NAME
ON SCHEDULE EVERY '18: 00:00 'DAY
DO
LOAD DATA LOCAL INFILE 'd :/ data.txt'
INTO TABLE table_name
FIELDS terminated BY ','
LINES terminated BY '\ n'
(atribut1, atribut2, atribut3);
if i just write like this
LOAD DATA LOCAL INFILE 'd :/ data.txt'
INTO TABLE table_name
FIELDS terminated BY ','
LINES terminated BY '\ n'
(atribut1, atribut2, atribut3);
the query was successfully executed
but if i write the code like a fist code instead there is an error "LOAD DATA is not allowed in stored procedures". is it really like that? if it's like that how do i to handle such cases? thanks in advance sorry for my bad english