|
|
Archives of the TeradataForum
Message Posted: Tue, 17 Jul 2012 @ 12:37:04 GMT
Subj: | | Re: How to split full name to first,middle & last |
|
From: | | naresh.neelam |
Hi Vinod,
try this,
select 'Cisco Zensar ODC' as Name, substr(Name,0,position(' ' in Name)+1) as First_Name,
substr(substr(Name,position(' ' in Name)+1),0,position(' ' in substr(Name,position(' ' in
Name)+1))) as Middle_Name,
substr(substr(Name,position(' ' in Name)+1),position(' ' in substr(Name,position(' ' in
Name)+1))+1) as Last_Name
Thanks,
Naresh Neelam
| |