更新时间:2021-09-22 23:22:48
DECLARE
CURSOR citynames IS
SELECT city FROM table_loc_master where statecode = 'PQ';
CURSOR leasecity IS
SELECT city FROM table_loc where State = 'PQ'
MINUS
SELECT to_char(city) city FROM table_loc_master where statecode = 'PQ';
xProb NUMBER(10,8);
BEGIN
FOR x_rec IN leasecity
LOOP
FOR y_rec IN citynames
LOOP
xProb := jwrun(x_rec.city,y_rec.city,length(y_rec.city));
If xProb > 0.97 Then
DBMS_OUTPUT.PUT_LINE('Source : ' || x_rec.city || ' Target: ' || y_rec.city );
End if;
END LOOP;
END LOOP;
END;