Hi, with regular expression is easier, this replace all characters
except alphanumeric one
SELECT /*+FIRST_ROWS */ REGEXP_REPLACE('OR%^$&*AC&^LE','[^[:alpha:]]')
FROM dual

On Dec 1, 5:02 am, Niraj Singh The King <parihar.nirajsi...@gmail.com>
wrote:
> But this will not be an generic code for all the special characters.Anyways
> thanks
> --
> Thanks and Regards,
> Opus Software Solution(Pune)
> Niraj Singh Parihar
> Mobile Number : +919890492566.
>
> On Mon, Nov 30, 2009 at 7:34 PM, Patricio Rodriguez <
>
>
>
> rodriguez.patri...@gmail.com> wrote:
> > You can use the REPLACE function to replace the special characters.
>
> > Example:
> > SELECT   'OR%^$&*AC&^LE' original_string
> >         ,REPLACE (
> >             REPLACE (
> >                REPLACE (
> >                   REPLACE (
> >                      REPLACE (REPLACE ('OR%^$&*AC&^LE', '%', NULL)
> >                              ,'^'
> >                              ,NULL)
> >                     ,'&'
> >                     ,NULL
> >                   )
> >                  ,'$'
> >                  ,NULL
> >                )
> >               ,'%'
> >               ,NULL
> >             )
> >            ,'*'
> >            ,NULL
> >          )
> >             modified_string
> >   FROM   DUAL
>
> > Put that in a function or in a general package and ready.
>
> > On Mon, Nov 30, 2009 at 4:22 AM, Niraj Singh The King <
> > parihar.nirajsi...@gmail.com> wrote:
>
> >> Please help me in providing a sample code to remove special characters
> >> from a string
>
> >> For E.g if i give string "OR%^$&*AC&^LE" the o/p should be "ORACLE"
> >> --
> >> Thanks and Regards,
> >> Niraj Singh Parihar
> >> Mobile Number : +919890492566.
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Oracle PL/SQL" group.
> >> To post to this group, send email to Oracle-PLSQL@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> oracle-plsql-unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/Oracle-PLSQL?hl=en
>
> > --
> > Patricio Rodriguez
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Oracle PL/SQL" group.
> > To post to this group, send email to Oracle-PLSQL@googlegroups.com
> > To unsubscribe from this group, send email to
> > oracle-plsql-unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/Oracle-PLSQL?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to