Re: autoincrement while doing the insert
I am still having an issue here. I am trying to get mySQL to create a new autoincremented id. That is why I have zero. I am getting an error 1064, which says "you have a sql syntax error near '0,srat.taxyear, srat.employee_email, srat.employee, srat.qualified_dollars' at line 1. I can't help think that the problem is the autoincrement field. How can I fix this?
INSERT IGNORE INTO BC_PR_list_temp 0, srat.taxyear , srat.employee_email , srat.employee , srat.qualified_dollars
,e.employee_title as title,e.role as role,e.num_BC ,e.num_PR,'BC','',srat.qualified_dollars/e.num_BC as dollarsPerBC,
srat.qualified_dollars/e.num_PR as dollarsPerPR, e.business_component_string,e.project_string
FROM survey_results_activities_temp srat, employees e
WHERE campaign= ? AND email= ? AND e.employee_email=srat.employee_email AND srat.employee_email IN (SELECT srat.employee_email FROM employees WHERE FIND_IN_SET(?, e.business_component_string))";