This should be very easy to do, but I cant do it. I have 3 tables. One has a list of Employees, one has a score in it for the perfomance for a month, and another has there performance for a year.
I have pulled out a unique code, from the employee table and the 2 other tables have this code in them in which they are linked. Now when I pull out the employee code and this shows every result in that table, which is correct. If i add the performance from the month table it puts the result next to the correct code, or leaves it blank. Now what im trying to do is add the performance from the month table and year table. How ever currently the year table is blank, so Im expecting to get a result of just the month table, but I get nothing. I only get the employee code with a blank field next too it.
So all I want is these 2 fields too add together. Also if there is no record it should have a 0 next to the code.
can any one help me?
Here is the SQL code by the way, just incase anyone wondered about my links
SELECT tblEmployee.Code, [tblMonth].[Performance]+[tblYear].[Performance] AS Overall
FROM (tblEmployee LEFT JOIN tblMonth ON tblEmployee.Code = tblMonth.Code) LEFT JOIN tblYear ON tblEmployee.Code = tblYear.Code
GROUP BY tblEmployee.Code, [tblMonth].[Performance]+[tblYear].[Performance];
I have pulled out a unique code, from the employee table and the 2 other tables have this code in them in which they are linked. Now when I pull out the employee code and this shows every result in that table, which is correct. If i add the performance from the month table it puts the result next to the correct code, or leaves it blank. Now what im trying to do is add the performance from the month table and year table. How ever currently the year table is blank, so Im expecting to get a result of just the month table, but I get nothing. I only get the employee code with a blank field next too it.
So all I want is these 2 fields too add together. Also if there is no record it should have a 0 next to the code.
can any one help me?
Here is the SQL code by the way, just incase anyone wondered about my links
SELECT tblEmployee.Code, [tblMonth].[Performance]+[tblYear].[Performance] AS Overall
FROM (tblEmployee LEFT JOIN tblMonth ON tblEmployee.Code = tblMonth.Code) LEFT JOIN tblYear ON tblEmployee.Code = tblYear.Code
GROUP BY tblEmployee.Code, [tblMonth].[Performance]+[tblYear].[Performance];