hb120973135 发表于 2018-10-22 07:30:24

pl/sql 找到数组中公有的字符

  procedure charintersect(i_str1 in varchar2,
  i_str2 in varchar2,
  o_strout varchar2) is
  v_len_str2    number;
  v_str2_single varchar2(1);
  begin
  v_len_str2 := length(i_str2);
  for i in 1 .. v_len_str2
  loop
  v_str2_single := substr(i_str2, i, 1);
  if instr(i_str1, v_str2_single) > 0 then
  o_str := v_str2_single || o_str;
  end if;
  end loop;
  -- dbms_output.put_line(o_str);
  end charintersect;
  procedure find_common_char_arr(com_arr t_arrchar,str_resultout varchar2) is
  v_str varchar2(200);
  --type t_table is table of varchar2(200) index by binary_integer;;
  begin
  if com_arr.count=1 then
  v_str:=com_arr(1);
  else
  for i in 1 .. com_arr.count
  loop
  if i
页: [1]
查看完整版本: pl/sql 找到数组中公有的字符