MySQL Forums
Forum List  »  Newbie

Help with syntax error 1064
Posted by: E Block
Date: June 10, 2015 10:05PM

INSERT INTO 'jobs.companyID' SELECT*FROM 'companies.companyID' WHERE 'jobs.company=companies.company';

The above is resulting in a #1064 error, "#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''jobs.companyID' SELECT*FROM 'companies.companyID' WHERE 'jobs.company=companies' at line 1

My tables are 'companies' and 'jobs' and the referenced fields are correctly labeled.

I am trying to match a company name between the two tables and then if there is a match, to place the company ID which is primary in the company table into the jobs field called companyID. I am using MYSQL 5.1.55

Options: ReplyQuote


Subject
Written By
Posted
Help with syntax error 1064
June 10, 2015 10:05PM


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.