I have 2 tables: PARTS and INVLOC. PARTS contains 15,413 records
When I run the following query, I am only getting 12,889 records returned:
I am missing all my PARTS records that do not have a corresponding item_no in INVLOC. But this is not how I understood a LEFT JOIN to work. I want all of the records in PARTS, and qty_on_hand only when it exists. I am sure I must be missing something fundamental here, this is such a simple query. Can anyone point me in the right direction?
When I run the following query, I am only getting 12,889 records returned:
Code:
SELECT PARTS.*, INVLOC.qty_on_hand
FROM PARTS LEFT JOIN INVLOC ON PARTS.part_num = INVLOC.item_no
WHERE INVLOC.loc = 'EX'
ORDER BY PARTS.ID;