J
Jacques Latoison
Hello all,
I have a query that searches four different tables.
Employees, EmpAddresses, Payrolls, Contractors
Employees is 1-many to EmpAddress (so that historical data is kept on
addresses).
EmpAddress is 1-many to Payrolls (because paystubs have the current address
on them and for historical as well).
Contractors is a lookup table/pull down for the Payrolls table.
I need a proper count in the query of Employees per grouping.
Every query whether Select or CrossTab gives me a count of Payroll records
instead of Employees.
Example:
5 employees can have 10 paystubs a piece. Instead of counting and showing 5
people, it says there are 50 people because that's the total amount of
Payroll records that exist (meaning that each person shows up 10 times to
the Payrolls table because the Primary Key from Employees shows up 10 times
per person in the Payrolls table - 1-many relationship).
I can't remove the Payrolls table because I need to generate reports with
Payroll records.
I'm thinking its just something I don't know how to do, so any help is
appreciated.
I have a query that searches four different tables.
Employees, EmpAddresses, Payrolls, Contractors
Employees is 1-many to EmpAddress (so that historical data is kept on
addresses).
EmpAddress is 1-many to Payrolls (because paystubs have the current address
on them and for historical as well).
Contractors is a lookup table/pull down for the Payrolls table.
I need a proper count in the query of Employees per grouping.
Every query whether Select or CrossTab gives me a count of Payroll records
instead of Employees.
Example:
5 employees can have 10 paystubs a piece. Instead of counting and showing 5
people, it says there are 50 people because that's the total amount of
Payroll records that exist (meaning that each person shows up 10 times to
the Payrolls table because the Primary Key from Employees shows up 10 times
per person in the Payrolls table - 1-many relationship).
I can't remove the Payrolls table because I need to generate reports with
Payroll records.
I'm thinking its just something I don't know how to do, so any help is
appreciated.