i have table with same fields,want to update that fields,with where clause,
update tmp_aus_inv_data
SET cust_region= "ROTOMOULD"
WHERE division = "ROTOMOULD" ;
update tmp_aus_inv_data
SET cust_region= "Internal"
WHERE division = "EXTRUSION" and ucase(cust_region) like ucase('Internal%') ;
i tried with this,but not working,
update tmp_aus_inv_data
(set cust_region= "ROTOMOULD"),
(SET cust_region= "Internal")
WHERE division = "ROTOMOULD" and WHERE division = "EXTRUSION" and ucase(cust_region) like ucase('Internal%') ;
You can use a
CASEstatement in yourUPDATE, so I think you want something like this:See SQL Fiddle with Demo