--============================================================================ -- Copywright 2002, joel crainshaw & chet west --============================================================================ -- DESCRIPTION -- simple function to remove "symbols" from a string; -- can specify a length to look at; readds left-to-right -- to consider the entire string, pass in 2000 as length - returns cleaned string --============================================================================ -- MODIFICATION HISTORY -- Person Date Comments -- --------- ---------- ------------------------------------------- -- joel 04/20/2001 Initial Creation --============================================================================ 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;