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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Script Library
 Parse and format name strings.
 Reply to Topic
 Printer Friendly
Previous Page
Author  Topic Next Topic
Page: of 2

bholmstrom
Yak Posting Veteran

USA
76 Posts

Posted - 08/19/2016 :  09:32:03  Show Profile  Reply with Quote
I am trying to use your parse_name function but it is failing on the following

,ncos.dbo.parse_name(n.nc_contact, 'H') as 'Prefix'
,ncos.dbo.parse_name(n.nc_contact, 'F') as 'FirstName'
,ncos.dbo.parse_name(n.nc_contact, 'M') as 'MiddleName'
,ncos.dbo.parse_name(n.nc_contact, 'L') as 'LastName'
,ncos.dbo.parse_name(n.nc_contact, 'S') as 'Suffix'

Data Samples:

'Monica Tujak, CPA'
'David Gamburg, M.D.'
'Alex Bougslavsky, CFA'
'Krystyna J. Hepler, CPPB'

Data Results:

nc_contact Prefix FirstName MiddleName LastName Suffix
David Gamburg, M.D. M D David Gamburg
Alex Bougslavsky, CFA CFA Alex Bougslavsky
Krystyna J. Hepler, CPPB Krystyna J Hepler CPPB
Monica Tujak, CPA CPA Monica Tujak


Bryan Holmstrom
Go to Top of Page
Page: of 2  Topic Next Topic  
Previous Page
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000