MySQL Forums
Forum List  »  Newbie

Re: help with a simple query problem SQL
Posted by: timb
Date: March 29, 2005 04:13PM

Have you tried a union query? Something like the following should work.

SELECT module.ModuleCode, module.Title, module.Semester,module.StaffID_1, staff.name, staff.Email
FROM module
INNER JOIN staff ON module.StaffID_1 = staff.staffID'
UNION
SELECT module.ModuleCode, module.Title, module.Semester,module.StaffID_2, staff.name, staff.Email
FROM module
INNER JOIN staff ON module.StaffID_2 = staff.staffID';

Options: ReplyQuote


Subject
Written By
Posted
Re: help with a simple query problem SQL
March 29, 2005 04:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.