MySQL Forums
Forum List  »  Newbie

Re: autoincrement while doing the insert
Posted by: Rich Bernstein
Date: September 29, 2022 08:59AM

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))";

Options: ReplyQuote


Subject
Written By
Posted
Re: autoincrement while doing the insert
September 29, 2022 08:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.