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

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Extracting Multiple names from a field
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

75 Posts

Posted - 11/08/2013 :  13:11:36  Show Profile  Reply with Quote
Good afternoon, I have a table that has several fields that contain multiple user names sepearted by a ";". I am trying to extract all of the names into one column so I can then compare it against our active directory.

It would be nice if there was list of names, not duplicated.


Row 1
Field1 'Mary Beth Underwood'
Field2 'Bryan Flinstone'
Field3 'Mary Beth Underwood;George Test'
Field4 'Hank String'

Row 2
Field1 'Gary Strong'
Field2 'Barney Ted;George Bishop; Hank String'
Field3 'Liz What;Ted Notime'
Field4 'Henry Franks'

What I would like to see is a list like this:

Barney Ted
Bryan Flinstone
Gary Strong
George Bishop
George Test
Hank String
Henry Franks
Liz What
Mary Beth Underwood

Thank you for your always prompt responses

Bryan Holmstrom

Flowing Fount of Yak Knowledge

4614 Posts

Posted - 11/08/2013 :  13:50:10  Show Profile  Reply with Quote
If you scroll to the bottom you will see an answer with multiple way to do this:
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  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.05 seconds. Powered By: Snitz Forums 2000