ORACLE

ORACLE
Let us share our knowledge to the world of oracle apps. I am trying my best to do so and I request every one to contribute their part. If you have any thing useful related to oracle apps, do send me I will post in my blog on behalf of you. If you like my blog tell the world about it, else tell me i will improve. You can suggest me, what exactly you want on oracle apps. Mail your queries.

Wednesday, June 6, 2012

Function to Replace String’s

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;

No comments:

Post a Comment