alexkeel79
MIS
I am running into a problem when using the left join table. I have one table (table1) that has a count of items and the expense code assigned to that count of items. I have a second table (table2) that gives me additional information related to the expense code. I am using a left join because some of the expense codes in table1 may not be valid. However the sum of the items I get before using the left join is different after I use the left join. Example
SELECT SUM(table1.items)
FROM table1
this = 1046
SELECT SUM(table1.items)
FROM table1 LEFT JOIN table2 ON expenseCode
this = 1014
Since I am using a left join I should get all records from table 1. Any idea why this isn't working?
SELECT SUM(table1.items)
FROM table1
this = 1046
SELECT SUM(table1.items)
FROM table1 LEFT JOIN table2 ON expenseCode
this = 1014
Since I am using a left join I should get all records from table 1. Any idea why this isn't working?