MySQL Forums
Forum List  »  General

UPDATE with a SELECT
Posted by: John Biddulph
Date: May 30, 2018 02:21PM

I would like to run the following UPDATE:
UPDATE `servicescopy` SET `newCustomerID`=ct.userid WHERE CustomerID = cust.CustomerID

based on the following SELECT:

SELECT cust.CustomerID, ct.userid
FROM tblcontacts as ct
INNER JOIN tblclients as cli
ON ct.userid = cli.userid
INNER JOIN customerold as cust
ON CONCAT(cust.Initials, cust.Surname) = CONCAT(ct.firstname, cli.company)


Please help

Options: ReplyQuote


Subject
Written By
Posted
UPDATE with a SELECT
May 30, 2018 02:21PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.