Quoting "Bosky, Dave" <[EMAIL PROTECTED]>: > > I'm trying to look up the department name and group description using their > ID's. > But it only returns the records where it finds both department and group > descriptions. Some records don't have a group description or department name. > I believe I'm using the wrong type of join but I'm stumped. Any ideas or > better ways of accomplishing this query. > > SELECT A.DepartmentID, A.AdminName, A.GroupID, B.DepartmentName, > C.Description > FROM DeptAdmin A > INNER JOIN Dept B ON A.DepartmentID = B.DepartmentID > INNER JOIN DeptGroups C ON A.GroupID = C.GroupID
SELECT A.DepartmentID, A.AdminName, A.GroupID, B.DepartmentName, C.Description FROM DeptAdmin A LEFT JOIN Dept B ON A.DepartmentID = B.DepartmentID LEFT JOIN DeptGroups C ON A.GroupID = C.GroupID Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

