2 Replies Latest reply: Feb 18, 2013 4:49 AM by Rahul_India RSS

    string

    974898
      Hi all,

      I want to get sub string rasheed mohamed from email id rasheed.mohamed@gmail.com

      how do i write sql query to get the above output
        • 1. Re: string
          Rahul_India
          with t as
          (
          select 'rasheed.mohamed@gmail.com' str
          from dual
          )
          select replace(substr(str,1,instr(str,'@',1,1)-1 ),'.',' ')
           name from t
          Edited by: Rahul India on Feb 18, 2013 4:19 PM
          • 2. Re: string
            jeneesh
            anees_mohd wrote:
            Hi all,

            I want to get sub string rasheed mohamed from email id rasheed.mohamed@gmail.com

            how do i write sql query to get the above output
            replace(substr(email,1,instr(email,'@')-1),'.',' ')
            
            with t as
            (
            select 'rasheed.mohamed@gmail.com' email 
            from dual
            )
            select email,replace(substr(email,1,instr(email,'@')-1),'.',' ') name
            from t;
            
            EMAIL                     NAME  
            ------------------------- -------
            
            rasheed.mohamed@gmail.com rasheed mohamed 
            Edited by: jeneesh on Feb 18, 2013 4:12 PM