FUNCTION nosymbols (p_text VARCHAR2, p_length NUMBER)
RETURN VARCHAR2
IS
v_clean VARCHAR2 (2000);
BEGIN
v_clean :=
SUBSTR (REPLACE (TRANSLATE (p_text,
'~`!@#$%^&*()_-+={}|[]\:";''<>?,./',
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
),
'~',
NULL
),
1,
NVL (p_length, LENGTH (p_text))
);
RETURN (v_clean);
END nosymbols;
RETURN VARCHAR2
IS
v_clean VARCHAR2 (2000);
BEGIN
v_clean :=
SUBSTR (REPLACE (TRANSLATE (p_text,
'~`!@#$%^&*()_-+={}|[]\:";''<>?,./',
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
),
'~',
NULL
),
1,
NVL (p_length, LENGTH (p_text))
);
RETURN (v_clean);
END nosymbols;
No comments:
Post a Comment