Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 seperating out name fields

Author  Topic 

waxdart23
Starting Member

33 Posts

Posted - 2005-11-28 : 08:26:37
I have a customer name field which I need to convert into a new system that has the names sepeated into title, first name and last name. I can get the title by using:
left(rinfo_1, (patindex('% %', rinfo_1) - 1))

but cannot work out how to get the rest as they are variable length so cannnot use 'Right'.

Please can anyone help?
Thanks

Thanks
P

surendrakalekar
Posting Yak Master

120 Posts

Posted - 2005-11-28 : 08:36:02
Post some sample data and let us know the required output.

Surendra
Go to Top of Page

waxdart23
Starting Member

33 Posts

Posted - 2005-11-28 : 08:44:55
Thanks, I found the answer here, this person is doing soemthing very similar.

http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=58215


Thanks
P
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2005-11-28 : 10:12:31
This will parse virtually any western name string, including honorifics, titles, and suffixes:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=56499
Go to Top of Page
   

- Advertisement -