MySQL Forums
Forum List  »  MySQL Workbench

UPDATE value in Column based on value Other column same table
Posted by: Daniel Coetzee
Date: January 12, 2023 04:12AM

Hi,

Quite new at this. I tried to update a column in a CSV with the below code. Basically what I want to do is select multiple values in one column in order to update the value in the new column (like creating categories). In excel I either filter on a set of values to update the other column, but even if I just add one value it wont update. No errors just no change?

UPDATE telecom_customer_churn
SET ChurnGroup = "Delivery Satisfaction"
WHERE ChurnReason IN("Network Reliability","Product dissatisfaction","Limited range of services", "Competitor had better devices","Competitor made better offer","Long distance charges","Competitor offered higher download speeds", "Competitor offered more data","Lack of affordable download/upload speed","Price to high", "Extra data charges")

or even just

UPDATE telecom_customer_churn
SET ChurnGroup = "Delivery Satisfaction"
WHERE ChurnReason = "Network Reliability";

Neither of these changes anything, but bot will run.

Options: ReplyQuote


Subject
Views
Written By
Posted
UPDATE value in Column based on value Other column same table
292
January 12, 2023 04:12AM


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.