D
depawl
I’m trying to design a query for the cost of employee stock
transactions. In an EMPLOYEE table, I have the EMPLOYEEID, the
STOCKNUMBER, and the DATE that the stock was issued. In a PURCHASE table
I have the COST of the item and the STOCKNUMBER. I’ve created the query
by joining the STOCKNUMBERs. I’m trying to limit the query to only the
transactions. The problem I’m encountering is that if a STOCKNUMBER
appears more than once in the PURCHASE table, it gets carried over into
the query, thus giving erroneous results. In other words, the query ends
up listing more transactions than actually occurred. I’ve tried setting
left joins and right joins but can’t seem to get it to work.
transactions. In an EMPLOYEE table, I have the EMPLOYEEID, the
STOCKNUMBER, and the DATE that the stock was issued. In a PURCHASE table
I have the COST of the item and the STOCKNUMBER. I’ve created the query
by joining the STOCKNUMBERs. I’m trying to limit the query to only the
transactions. The problem I’m encountering is that if a STOCKNUMBER
appears more than once in the PURCHASE table, it gets carried over into
the query, thus giving erroneous results. In other words, the query ends
up listing more transactions than actually occurred. I’ve tried setting
left joins and right joins but can’t seem to get it to work.