UPDATE vn.supplier
SET nif = SUBSTRING(nif, IF(ASCII(SUBSTRING(nif, 1, 1)) BETWEEN 65 AND 90 AND ASCII(SUBSTRING(nif, 2, 1)) BETWEEN 65 AND 90, 3, 1), LENGTH(nif))
WHERE isVies = 1 AND nif REGEXP '^[a-zA-Z]{2}';
