I want to change all the words in the job_title
.
In my example below the job_title
is:
art department work experience/greenswoman
in row 86619
.
Here is the code:
Set autocommit = 1;
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'art','Art') WHERE job_title_id = 86619;
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'work','Work') WHERE job_title_id = 86619;
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'department','Department') WHERE job_title_id = 86619;
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'experience','Experience') WHERE job_title_id = 86619;
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'greenswoman','Greenswoman') WHERE job_title_id = 86619;
select job_title from tvt_job_title where job_title_id = 86619;
The result:
art department work experience/Greenswoman
only Greenswoman gets corrected! Why don't all the words get corrected?
The output:
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'art','Art') WHERE job_title_id = 86619 1 row(s) affected Rows matched: 1 Changed: 1 Warnings: 0
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'work','Work') WHERE job_title_id = 86619 1 row(s) affected Rows matched: 1 Changed: 1 Warnings: 0
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'department','Department') WHERE job_title_id = 86619 1 row(s) affected Rows matched: 1 Changed: 1 Warnings: 0
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'experience','Experience'), abbreviation = REPLACE(LOWER(abbreviation),'experience','Experience') WHERE job_title_id = 86619 1 row(s) affected Rows matched: 1 Changed: 1 Warnings: 0
UPDATE tvt_job_title SET job_title = REPLACE(LOWER(job_title),'greenswoman','Greenswoman'), abbreviation = REPLACE(LOWER(abbreviation),'greenswoman','Greenswoman') WHERE job_title_id = 86619 1 row(s) affected Rows matched: 1 Changed: 1 Warnings: 0
select job_title from tvt_job_title where job_title_id = 86619 1 row(s) returned