1

I am getting an issue with this update statement:

update customers
set customers.email = initialsynctemptable.thinkEmail,
    customers.packages = initialsynctemptable.thinkPackages 
FROM customers INNER JOIN initialsynctemptable
ON  customers.id = initialsynctemptable.customerID

and are using mySQL. There is a squigly line under the FROM word. Essentially I am trying to do an update one table (customers) with data from another table (initialsynctemptable).....Help! Thanking you

1

1 Answer 1

2

Try

UPDATE customers c INNER JOIN 
       initialsynctemptable i ON  c.id = i.customerID
   SET c.email = i.thinkEmail,
       c.packages = i.thinkPackages 
Sign up to request clarification or add additional context in comments.

2 Comments

another quick question if I can. If thinkemail and thinkpackages are varchars which could have null values do you think i need a WHERE clause? Thanking you
@Mat41 You're welcome. Glad it helped. Now if you want to prevent it from happening (assigning NULL values) then go ahead and filter those records out with WHERE clause.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.