• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1829
  • Last Modified:

how eliminate character special in PL/SQL

i have this problem, i receive from java aplication a input parameter with character special non printable.

How do i to eliminate this characters in PL/SQL

regards

Gerid Garcia
0
yerai
Asked:
yerai
1 Solution
 
ravindran_eeeCommented:
Hi,

Use the below Oracle function..

create or replace function remove_special_chars (i_input varchar2)
return varchar as
l_temp varchar2(100);
o_output varchar2(100);
i number;
begin
for i in 1..length(i_input)
loop
select substr(i_input,i,1) into l_temp from dual;
if ascii(l_temp) >= 32 or ascii(l_temp) <= 126 then
o_output := o_output || l_temp;
end if;
end loop;
return o_output;
end remove_special_chars;
/

Thanks,
Ravindran
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now