Unable to load from csv to mysql table? -
load data local infile 'hr.csv' table hr_analytics fields terminated '`' ignore 1 lines(no,satisfaction_level,last_evaluation,number_project,average_montly_hours,time_spend_company,work_accident,left,promotion_last_5years,sales,salary)
when run above query get:
you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'left,promotion_last_5years,sales,salary)' @ line 1
how solve this?
the problem seems left
mysql key word. try this:
load data local infile 'hr.csv' table hr_analytics fields terminated '`' ignore 1 lines(`no`,`satisfaction_level`,`last_evaluation`,`number_project`,`average_montly_hours`,`time_spend_company`,`work_accident`,`left`,`promotion_last_5years`,`sales`,`salary`)
Comments
Post a Comment