dina78
asked on
How to merge two tables on access
Hello Experts,
I am in the process of analyzing the customer base against the salary amounts. I have the following
Table one
Cust ID Salary
4556 500
4321 600
4566 100
123 999
1234 456
Table two
Cust ID Salary
4556 399
54545 999
4566 5000
123456 500
4321 444
I need to have one table that has all the data. Please note that not all customers in table 1 are in table two and not all customers in table 2 are in table 1.
Therefore I am having a problem joining these two tables.
I would like to have the following
Cust ID Salary1 Salary2
Where if for example customer 4321 salary in table1 is 600 but he is not in table 2 so value of zero should be assigned in the new table im trying to create
Thanks
I am in the process of analyzing the customer base against the salary amounts. I have the following
Table one
Cust ID Salary
4556 500
4321 600
4566 100
123 999
1234 456
Table two
Cust ID Salary
4556 399
54545 999
4566 5000
123456 500
4321 444
I need to have one table that has all the data. Please note that not all customers in table 1 are in table two and not all customers in table 2 are in table 1.
Therefore I am having a problem joining these two tables.
I would like to have the following
Cust ID Salary1 Salary2
Where if for example customer 4321 salary in table1 is 600 but he is not in table 2 so value of zero should be assigned in the new table im trying to create
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select distinct custid, table1.salary, table2.salary from table1, table2
ASKER
perfect solution thanks alot