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

Joining data to display information that is the same 1

Status
Not open for further replies.

Herdrich

Technical User
Dec 30, 2008
83
US
I am trying to compare two databases against each other
and have the data that is the same be displayed. I can get the SQL code to run if it is only last name or first name but cannot figure out how to make it check that both the first and last name match then displaying the information. The code bellow is what i am trying to accomplish but it will not run for me any help would be grate.


Code:
 SELECT [Mass List].[Last Name], [Mass List].[First Name]
FROM [Mass List] INNER JOIN Query ON [Mass List].[Last Name], [Mass List].[First Name] = Query.[Last Name], [Mass List].[First Name];

Thanks,
Glenn
 
Code:
SELECT [Mass List].[Last Name], [Mass List].[First Name]
FROM [Mass List] INNER JOIN Query ON [Mass List].[Last Name], [Mass List].[First Name] = [Query].[Last Name], [Query].[First Name];
 
SELECT [Mass List].[Last Name], [Mass List].[First Name]
FROM [Mass List] INNER JOIN Query ON [Mass List].[Last Name] = Query.[Last Name] AND [Mass List].[First Name] = Query.[First Name]

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top