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

running a query compairing tables...Access newbie

Status
Not open for further replies.

Adminman

MIS
Nov 28, 2001
46
0
0
US
We have two tables (employee info and employee deductions) and we need to run a query that would capture info from both tables. I think we need an expression that would pull all employees that have 401k and employees that don't. What would the general framework of the query look like?

I'm using Access 2002
An employee list doesn't provide the information concerning deductions.

I know I'm not clear on how to do this, and I am willing to provide any additional information that may be needed.

Thanks,

Dave
 
Why not JOINing the tables ?
Are the RelationShips properly set ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

As far as i can tell all the joins are correct. I will check each of them again.

thanks,
Dave

The query is running against a MS SQL database.
 
SELECT * FROM tblEmployeeInfo INNER JOIN tblEmployeeDeductions ON tblEmployeeInfo.EmployeeID = tblEmployeeDeductions.EmployeeID

will return every field from both tables.

you can limit this by individually selecting fields:

SELECT EmployeeName, 401DeductionAmount FROM tblEmployeeInfo INNER JOIN tblEmployeeDeductions ON tblEmployeeInfo.EmployeeID = tblEmployeeDeductions.EmployeeID

Will return just the name from the EmployeeInfo table and the 401 deduction amount from the deduction table.

Make sense?

HTH

leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top