conditional update
hi
I have two tables..
1. csv_country (country_code varchar2(2) , country_name varchar2(255)
2. country (country_code varchar2(2) , country_name varchar2(255)
now. i want to update country table with below condition..
if country.country_name = csv.country_name then
if country.country_code != csv.country_code then
update country set country_code = csv.country_code where country.country_name=csv.country_name;
end if;
else
insert into country select * from csv_country.
how to write pl/sql or sql for above requirement.
Thanks,
Rajesh
0