Hello,
I am trying to perform an SQL UPDATE on my MySQL Links table. Within the Links table I have two columns one of which is a custom field and they are defined as
Contact_Email varchar(255)
URL varchar(255)
I have a 2nd table called temp with the same two columns defined in it as well.
Using an SQL UPDATE query, I am trying to move the email addresses from the 2nd table to the corresponding entries in the first Links table. Here is my query
SELECT Links.Contact_Email, Links.URL, temp.Contact_Email, temp.URL
FROM Links, temp
WHERE Links.URL = temp.URL
UPDATE Links SET Links.Contact_Email = temp.Contact_Email;
The query produces an ERROR 1064 and points to the UPDATE part of the query. Permissions seem fine as I can do simpler updates with no problem. I am running MySQL 3.23.57.
Can someone tell me what I am doing wrong? Thanks!!
I am trying to perform an SQL UPDATE on my MySQL Links table. Within the Links table I have two columns one of which is a custom field and they are defined as
Contact_Email varchar(255)
URL varchar(255)
I have a 2nd table called temp with the same two columns defined in it as well.
Using an SQL UPDATE query, I am trying to move the email addresses from the 2nd table to the corresponding entries in the first Links table. Here is my query
SELECT Links.Contact_Email, Links.URL, temp.Contact_Email, temp.URL
FROM Links, temp
WHERE Links.URL = temp.URL
UPDATE Links SET Links.Contact_Email = temp.Contact_Email;
The query produces an ERROR 1064 and points to the UPDATE part of the query. Permissions seem fine as I can do simpler updates with no problem. I am running MySQL 3.23.57.
Can someone tell me what I am doing wrong? Thanks!!