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/
,如需转载,请注明出处,否则将追究法律责任。