Hello Everyone,
Thequery shown below is supposed to show the number of cells having a bin_value = 4 for each silicon_wafer_number. It does this except for when a silicon_wafer_number has no cells with bin_value=4 in which case it just doesn't displays the record (rather than putting a count of "0" which is what i want). I've been looking at other posts in this and other forums to do with NZ(Iff(.. and Left Joins but to no avail. Can anyone help? Thanks
Thequery shown below is supposed to show the number of cells having a bin_value = 4 for each silicon_wafer_number. It does this except for when a silicon_wafer_number has no cells with bin_value=4 in which case it just doesn't displays the record (rather than putting a count of "0" which is what i want). I've been looking at other posts in this and other forums to do with NZ(Iff(.. and Left Joins but to no avail. Can anyone help? Thanks
Code:
SELECT tbl_silicon_lot.silicon_lot AS [Silicon Lot], tbl_silicon_wafer.silicon_wafer_number AS Wafer, Count(tbl_cells.cells_id) AS CountOfcells_id, tbl_cells.bin_value
FROM (tbl_silicon_lot INNER JOIN tbl_silicon_wafer ON tbl_silicon_lot.silicon_lot_id = tbl_silicon_wafer.silicon_lot_id) INNER JOIN tbl_cells ON tbl_silicon_wafer.silicon_wafer_id = tbl_cells.silicon_wafer_id
GROUP BY tbl_silicon_lot.silicon_lot, tbl_silicon_wafer.silicon_wafer_number, tbl_cells.bin_value
HAVING (((tbl_cells.bin_value)=4));