Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query joins

Status
Not open for further replies.

samsa

Instructor
Aug 12, 2003
6
CA
dear gurus!I have a table called courses, another called hr.
Within courses table, I have a field called course and another called requiredCourse and yet another called recommendedCourse and another called positionNo.
Then in the hr table, there is a field called positionNo (primary key), a key field called positionTitle, fname, lname and hiredate.
What I would like to do is write a code that says give me all the required courses and the name of the employees who are supposed to take them.
Have they taken the courses?
If the answer is yes, put a checkmark on a checkbox.
If they have not, put an X.
How can I handle this?
Thanks in advance
 
Hi ...
you can use this simple join sql command although there are more complex left/right inner/outer joins.
this join works on ACCESS and SQL but not ORACLE.

SELECT courses.requiredCourse, hr.fname, hr.lname FROM courses, hr WHERE courses.positionNo = hr.positionNo

that's it.
and in your redordset, for each record you have three fields (requiredCourse,fname,lname)
you can add other fields which you require in your select command.
----
TNX.
E.T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top