Thank you for that clue. Now i prepared three queries
From Departments table, i had prepared Union query -
SELECT DepartmentID, DepartmentName FROM Departments UNION Select Null as AllChoice , "All Departments" as Bogus From Departments
ORDER BY DepartmentID;
From Employees table, i had prepared Union query -
SELECT DepartmentID, EmployeeName
FROM Employees
UNION Select Null as AllChoice , "All Employees" as Bogus From Employees
ORDER BY DepartmentID;
Similarly, from ReferenceDescription table, i had prepared Union query -
SELECT DepartmentID, ReferenceDescription
FROM ReferenceDescription
UNION Select Null as AllChoice , "All References" as Bogus From ReferenceDescription
ORDER BY DepartmentID;
Now my problem is, when i should get option of
- All Departments, All Employees and all ReferenceDescription
- Individual departments, All Employees in that department and All ReferenceDescriptions in that Department
- Individual departments, Individual Employees in that department and Individual ReferenceDescriptions in that Department
Please help me building the queiry
Thank you
-