I have two table .one from server and another from host.I have to union them and count total donor by gender.I tried to run this function.But It shows error.How can I solve it?
**create or replace function count_donor_by_gender(g in Donor.gender%TYPE)
return number
is
g_donor number:=0;
begin
FOR R IN (select * from Donor@site_link union Donor) LOOP
if(R.gender=g) then
g_donor:=g_donor+1;
end if;
END LOOP;
return g_donor;
end count_donor_by_gender;
/**
