Sorry if the question is silly but I am very noob with MYSQL and I am trying to update my table to clean and standardise the table. So I learned how to use the UPDATE command however I just want to check if there is a way to do the following:
UPDATE parse SET Stock = REPLACE(Stock, 'ETA%', 'Sold out');
Basically I want to have all the lines in my table that contain (or start with) ETA and change it to Sold out. The data is extracted from sites so Stock column has a bunch of crap like "ETA: 19-May" "ETA: in 5 days". I just want to change this all at once to "Sold out". Is there a way to do this?
I have also tried: UPDATE parse SET Stock = IF(Stock REGEXP '^ETA', 'Sold out', Stock);
but it didn't work. Any suggestion? Thanks !