I don't understand the results I'm getting.
I did a regular join that I thought would work:
SELECT bu, cart_id, ndc, error_flag, item_id, description, upc, ndc_uom, std_uom FROM inventory INNER JOIN link ON inventory.ndc=link.ndc AND bu ='08005' ORDER BY bu
The problem is I get a total of 6492 records but I'm looking at the records and some have the match key ndc in the parent table blank. How could it possibly be a join if there is no record?
Then I rewrote it thinking it should be a equi-join:
SELECT bu, cart_id, ndc, error_flag, item_id, description, upc, ndc_uom, std_uom FROM inventory INNER JOIN link ON inventory.ndc=onelink.ndc AND bu ='08005' ORDER BY bu
but got the same result?
Is the problem that it is joining on NULLS? How do I get rid of the NULLS then?
I would like to know how many ndc matches there are. I do wonder whether these two joins are basically the same join but worded different.
thanks