create table customers
(cust_last_name varchar2(10))
select * from customers;
insert into customers
values ('Anderson')
insert into customers
values('Ausson')
select replace (replace(cust_last_name,'son',''),'An','O') from customers; -- +
select replace (trim(trailing 'son' from cust_last_name),'An','O') from customers; -- trim should have only one character
select replace (substr (cust_last_name,-3),'An','O') from customers; -- both values are 'son'
select initcap(replace(trim('son' from cust_last_name),'An','O')) from customers; -- trim should have only one character