I had prepared three queries
SELECT DepartmentID, DepartmentName FROM Departments UNION Select Null as AllChoice , "All Departments" as Bogus From Departments
ORDER BY DepartmentID; --- From Departments table
SELECT DepartmentID, EmployeeName
FROM Employees
UNION Select Null as AllChoice , "All Employees" as Bogus From Employees
ORDER BY DepartmentID; ---From Employees table
SELECT DepartmentID, ReferenceDescription
FROM ReferenceDescription
UNION Select Null as AllChoice , "All References" as Bogus From ReferenceDescription
ORDER BY DepartmentID; ---from ReferenceDescription table
Now i want to develop query to derive following information:
- 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
SELECT DepartmentID, DepartmentName FROM Departments UNION Select Null as AllChoice , "All Departments" as Bogus From Departments
ORDER BY DepartmentID; --- From Departments table
SELECT DepartmentID, EmployeeName
FROM Employees
UNION Select Null as AllChoice , "All Employees" as Bogus From Employees
ORDER BY DepartmentID; ---From Employees table
SELECT DepartmentID, ReferenceDescription
FROM ReferenceDescription
UNION Select Null as AllChoice , "All References" as Bogus From ReferenceDescription
ORDER BY DepartmentID; ---from ReferenceDescription table
Now i want to develop query to derive following information:
- 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