How to add a column via a query which counts the total rows with a specific criteria in a table with circular relationship in MS ACCESS 2007
- by Xaqron
I have a simple table "Employees" with this fields:
ID, ParentID, Name
ParentID is Nullable since an employee may have no Manager.
This table has a one-to-many relationship with itself:
ID --one--to--many--> ParentID
Now I want a query which returns this columns:
Name, Count of rows where their ParentID equals to the current row ID (the…