RE: SQL Dilema
Posted in 1996
Mike,
Perhaps you are looking for something like:
SELECT teachers.col1, students.*
FROM table1 teachers, table1 students, table2
WHERE teachers.col1 = "<whatever>"
AND table2.fieldX = teachers.fieldX
AND students.fieldY = table2.fieldY
I hope that's enough to give you an idea. If not, please post
more detailed information about your table schemas. It's tough
to write queries on phony table names and columns.
--Craig (craig@chemistry.utah.edu)
>I am trying to write an SQL Statement to satisy the following situation,
>any help is appreciated.
>
>Table 1 - People - Teachers and Students
>Table 2 - Student names - exists for teachers only, linked to Table 1 by
>field X
>
>How do I produce output on a Teacher, his/her students, and Specific
>detail on the students contained in Table 1?
>
>I hope the question is clear. The dilema being that I am trying to
>access two different records in Table 1 at the same time. Help!