I'm not sure how to write this query ...
i have a table named CurrentBill with:
Bill
Component
I want to write a query that will give me the a list of Bills and Components where the Component does not exist as a Bill from the same table.
i have a table named CurrentBill with:
Bill
Component
I want to write a query that will give me the a list of Bills and Components where the Component does not exist as a Bill from the same table.
Code:
SELECT CurrentBill.Bill, CurrentBill.Component
FROM CurrentBill LEFT JOIN CurrentBill AS CurrentBill_1 ON CurrentBill.Component = CurrentBill_1.Bill
WHERE (((CurrentBill_1.Bill) Is Null))
GROUP BY CurrentBill.Bill, currentBill.Component)
ORDER BY CurrentBill.Bill, currentBill.Component);