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!

Get list from same data field in separate tables 1

Status
Not open for further replies.

jhaganjr

IS-IT--Management
Dec 11, 2002
62
0
0
US
This seems like it should be simple, but for some reason it's not (for me) ...

Table1:
RecID Client
1 A
2 B
3 C

Table2:
RecID Client
1 D
2 A
3 E

As you can see Client A appears in both tables, but the other clients do not. How do I query the Client value in both tables to generate a list of unique values that includes all of them. The desired result is ...

Client
A
B
C
D
E

Thanks!
Joe
 
Try a union query -

SELECT tableOne.client FROM tableOne
union
SELECT tableTwo.client FROM tableTwo
 
That's it. Thanks very much.

Simple, but unknown to me.

Thanks again,
Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top