Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 16 Jul 2012 @ 14:19:57 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: How to split full name to first,middle & last
 
From:   Mankala, Mahesh

Hi Vonod,

Please use this.

     select
      name
     ,substr(name,position(' ' in name)+1,char(name)) name1
     ,substr(name,0,position(' ' in name)) as "firstname"
     ,substr(name1,0,position(' ' in name1)) as "middlename"
     ,substr(name1,position(' ' in name1),char( name1)) "lastname"

     from  DBNAME.test1

Thanks,

Mahesh



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023