create or replace function f_con_str_2(v_pk in number) return varchar2 is str_return varchar2(200); v_11 number; v_22 number; cursor c_str(v_l number,v_2 number) is from t_temp where (ABS(v_1- dlongitude)+ABS(v_2- dlatitude))<=0.001; begin select dlatitude,dlongitude into v_11,v_22 from t_temp where pk=v_pk;--这里要通过传入的主键来进行检索, for str_temp in c_str(v_11,v_22) loop str_return:=str_return||' '||str_temp.strname; end loop; return str_return; exception when others null; end f_con_str_2; /
return varchar2 is
str_return varchar2(200);
v_11 number;
v_22 number;
cursor c_str(v_l number,v_2 number) is from t_temp where (ABS(v_1- dlongitude)+ABS(v_2- dlatitude))<=0.001;
begin
select dlatitude,dlongitude into v_11,v_22 from t_temp where pk=v_pk;--这里要通过传入的主键来进行检索,
for str_temp in c_str(v_11,v_22) loop
str_return:=str_return||' '||str_temp.strname;
end loop;
return str_return;
exception when others
null;
end f_con_str_2;
/