ITPub博客

首页 > Linux操作系统 > Linux操作系统 > check speical char

check speical char

原创 Linux操作系统 作者:susie0409 时间:2011-12-15 20:09:21 0 删除 编辑
sometimes the xlm report can't finished. as there have speical char in the report.
 
we can use such query to check the special char:
 
declare
  s  varchar2(4000);
  s1 varchar2(4000);
  s2 varchar2(4000);
  a  number;
  b  number;
  cursor cur_desc IS
    SELECT MSI.DESCRIPTION, segment1
      FROM APPS.mtl_system_items_b MSI
     WHERE segment1 IN (......)
       AND ORGANIZATION_ID =....;
begin
  for cur1 in cur_desc Loop
 
    a := 0;
    a := length(cur1.description);
    s := substr(cur1.description, 1, 1);
 
    for i in 2 .. a loop
   
      b := ascii(substr(cur1.description, i, 1));
      -- dbms_output.put_line('Value of b is :: ' || b || ':: for value :: ' ||substr(cur1.description,i,1) );
   
      if b not in (49855, 55328, 176, 150, 189, 190, 248) then
     
        s := s || substr(cur1.description, i, 1);
     
      end if;
   
    end loop;
    --dbms_output.put_line('for item :: ' || cur1.segment1 || ' :: ' || 'Description is :: ' || s);
 
    INSERT INTO apps.mtl_system_items_interface
      (segment1,
       organization_id,
       transaction_id,
       process_flag,
       set_process_id,
       transaction_type,
       description)
    values
      (cur1.segment1, .., NULL, 1, .., 'UPDATE', s);
 
  end loop;
end;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15225049/viewspace-713405/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: update item catalog
请登录后发表评论 登录
全部评论

注册时间:2009-09-30

  • 博文量
    115
  • 访问量
    305727