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

Merging two columns into a single list

Status
Not open for further replies.

donjohnson

Programmer
Jun 23, 2004
53
Hello!
Here is another question that should be easy, but has me stumped.

I have a table with Name1 and Name2 columns (among others).

I would like a distinct list of all the entries in Name1 and Name 2 as a single list.

For example, if I have

Name1 Name 2
Bob Bill
Joe Larry
Don Curly
Joe Moe
Don Bob
Bob Joe

I want a single sorted list:
Bill
Bob
Curly
Don
Joe
Larry
Moe

How can I do this simply?

Thanks!
Don
 
Boy, do I feel stupid!

I tried a union at one time, but did it in the SQL pane of Enterprise Manager's tables function, rather than in the SQL Query Analyzer. Once I moved there, the union worked fine.

Thanks for your help - now on to some other recordset problems I have with email!

Don
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top