Select Query Question (1 Viewer)

ecupirate

Registered User.
Local time
Today, 04:42
Joined
Apr 19, 2002
Messages
14
I have a query pulling from two tables. Both tables have a salary field, not good design, but built this way for a reason. Question in my query how do I make the salary field in table 2 = the salary in table 1. When I run my select query. Really don't want to use an Update query..

Thanks
 

RV

Registered User.
Local time
Today, 04:42
Joined
Feb 8, 2002
Messages
1,115
What you're trying to do is to select the salary in table2 which is related to the salary in table1, right?

If so, you'll have to combine the two tables in a query using an inner join.
There has to be a unique key in each table which uniquelly identifies a row in each table.

Assuming you unique key is SalaryID, try this:

SELECT table1.Salary
FROM table1 INNER JOIN table2 ON table1.SalaryID = table2.SalaryID
;
RV
 

Users who are viewing this thread

Top Bottom