Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split Contact Names

Status
Not open for further replies.

sparkbyte

Technical User
Sep 20, 2002
879
US
I am trying to split apart names in an OLD contacts list in a DB I inherited.

I can get close but not what I want.


Names are like this in the DB

Fuhrman, John F
Fuhrman III, John F
Fuhrman, Bradley
Fuhrman, Laura F (G555)


what I have been able to get so far is like

FirstName Middle LastName
,John F F Fuhrman
,John F F Fuhrman III
,Bradley Fuhrman
,Laura F F Fuhrman

I need to not have the comma and to strip the Middle initial from the 1st Name.


Fist I use a derived column to get First and Last names.
SUBSTRING(ContactName,(FINDSTRING(ContactName,",",1) + 1),(LEN(ContactName)))
SUBSTRING(ContactName,1,(FINDSTRING(ContactName,",",1) - 1))

Then from there I use the FirstName derived column to get the MiddleInit.
SUBSTRING(FirstName,(FINDSTRING(FirstName," ",2) + 1),1)



Does anyone have a whay to to this in SSIS?

Thanks!!

Thanks

John Fuhrman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top