SELECT A.DepartmentID, A.AdminName, A.GroupID, B.DepartmentName, C.Description FROM DeptAdmin A INNER JOIN Dept B ON A.DepartmentID = B.DepartmentID LEFT OUTER JOIN DeptGroups C ON A.GroupID = C.GroupID
Try that out .... Paul Giesehagen QuillDesign ----- Original Message ----- From: "Bosky, Dave" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 8:08 AM Subject: SQL Join - Help! > 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. > > example: > ------------------- > 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 > ------------------- > > Thank You, > > Dave Bosky > HTC Web Services > [EMAIL PROTECTED] > office: 843.369.8613 > > > > > HTC Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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