0% found this document useful (0 votes)
6 views1 page

Rcms Update

Uploaded by

Debasis Bhuyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Rcms Update

Uploaded by

Debasis Bhuyan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

create or replace procedure proc_debasis(p_perc number) is

cursor cr is
--select a.lgd_gp_code,upper(a.village_name) village_name_eng from
tbl_village_master a
--where exists (select 1 from temp_temp_village b where b.lgdgpcode=a.lgd_gp_code
--and upper(b.VILLAGE_NAME)=upper(a.VILLAGE_NAME)
----and
utl_match.edit_distance_similarity(upper(b.VILLAGE_NAME),upper(a.VILLAGE_NAME))=p_p
erc and
--and b.spdp_village_name is null and b.spdp_remark is null
--)
select village_name,village_id,lgd_gp_code,spdp_village_name from(
select upper(a.village_name) village_name,b.villageid
village_id,a.lgd_gp_code,b.spdp_village_name
from tbl_village_master a, temp_rcms_village b where a.lgd_gp_code=b.lgdgpcode
--and is_cap(a.village_name)=is_cap(b.village_name)
and
utl_match.edit_distance_similarity(is_cap(b.VILLAGE_NAME),is_cap(a.VILLAGE_NAME))>=
p_perc
) where spdp_village_name is null;

begin
for rec in cr loop

begin
update temp_rcms_village a set a.spdp_village_name=rec.village_name,
a.SPDP_REMARK =p_perc||'-MATCHED'
where a.lgdgpcode=rec.lgd_gp_code and a.villageid=rec.village_id
and a.spdp_village_name is null and a.spdp_remark is null
;
exception when others then
null;
end;
commit;
end loop;
end;

You might also like