I&#039;m trying to display a listing of our company employees ordered by location and department. I am using the following SQL statement to pull the correct records from the database.<BR><BR>SELECT * FROM Employees INNER JOIN (Departments INNER JOIN Locations ON Locations.LocationID = Departments.DeptLocationID) ON Departments.DeptID = Employees.DeptID WHERE Locations.LocationID &#060;&#062; 5 AND Employees.Active = 1 ORDER BY LocationID, DeptName, EmpTypeID, LastName<BR><BR>This SQL statement pulls the correct information in the correct order but the problem occurs during output:<BR><BR>QRYemployees.Movefirst<BR>Do while not QRYemployees.EOF<BR> Response.write QRYemployees("LocName") & "<BR>" & QRYemployees("DeptName") & "<BR>" & QRYemployees("FirstName") & " " & QRYemployees("LastName")<BR> QRYemployees.MoveNext<BR>Loop<BR><BR>This series of commands writes the location and department names repetatively. I want to write each location and department name only once with the employees listed below, a loop inside a loop inside a loop. Example of correct output:<BR><BR>Seattle<BR><BR>Administration<BR>Jo hn Doe - President<BR>Jane Doe - Vice President<BR><BR>Service<BR>Joe Smith - Service tech.<BR><BR>Any help would be greatly appreciated.