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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picking out alternative names in duplicate rows

Status
Not open for further replies.

supermatchgame

Programmer
May 16, 2007
50
GB
Hi,

I have some data in SQL that looks like this:

Code:
ID | FORENAME | SURNAME | ALTERNATIVENAME
1  | JOHN     | BLOGGS  | DENNIS
1  | JOHN     | BLOGGS  | FRANK

What I would like to do is to get this all into one row, similar to this:

Code:
ID | FORENAME | SURNAME | ALTERNATIVENAME1 | ALTERNATIVENAME2
1  | JOHN     | BLOGGS  | DENNIS | FRANK

Can anyone suggest a way of doing this using T - SQL?


 
Take a look at this Thread thread183-1418216

Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top