I have 3 tables: Employees, Locations, and EmpLocation
- Employees stores employee data with Employee_ID as primary key,
- Locations stores location data with Location_ID.
- EmpLocation stores Employee_ID and Location_ID. Each Employee can have multiple locations.
I have created an Interactive Grid that is based on the data from EmpLocation table:
SELECT EMPLOYEE_ID, LOCATION_ID
FROM EmpLocation
GROUP BY EMPLOYEE_ID, LOCATION_ID
Then each of the columns I set as a select list and use SQL query as a source:
SELECT Employee_FName, Employee_ID FROM Employees
and
SELECT LocationName, Location_ID FROM Locations
Everything looks fine but when I run query
SELECT EMPLOYEE_ID, LOCATION_ID
FROM EmpLocation
GROUP BY EMPLOYEE_ID, LOCATION_ID
in TOAD, I get about 100 records; but in the grid I get many duplicates. Cannot figure out what is going on...