how to automate 'load data infile' by passing the path & table name as variables
eg:
LOAD DATA LOCAL INFILE 'tablepath'
REPLACE INTO TABLE tablename
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;
I tried pass this as string & execute it, but execute won't work in load data infile. Any other suggestions to do the task?
Thanks,
ak
eg:
LOAD DATA LOCAL INFILE 'tablepath'
REPLACE INTO TABLE tablename
FIELDS TERMINATED BY '\t'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;
I tried pass this as string & execute it, but execute won't work in load data infile. Any other suggestions to do the task?
Thanks,
ak