Corticus
Well-known Member
- Joined
- Apr 30, 2002
- Messages
- 1,579
Hi all,
I've got this tricky query I'm trying to do. I have actually accomplished the retrieval of the data through means of reorganizing the data into new tables, and querying these, but I would like to know if a query could accomplish what I want right from the original table.
Anyways, here's the field names:
LastName/FirstName/Period/Professor/Course/Exempt(Y/N)
and data would look like this;
Doe/John/1/Mr. Smith/English/Y
Doe/John/2/Mr. James/Math/Y
Adams/Julie/1/Mrs. Jones/Chorus/N
I need to retrieve the students name for students who are exempt from either periods 1 and 2, or periods 3 and 4, or periods 5 and 6. In the case of the above data, John Doe would retreived.
What's tricky is neither the student, nor the course have a primary ID. The data was inherited in this format and consists of 8,063 records.
I used append queries to reorganize the data so there is a teacher table, each with a pka, and a course table, each with a pka, and then used an update querry to attach these pkas to the original table described above. I don't have the SQL I used handy but I'll post if it anybody cares.
Anyways, I would like to know how to query this table directly just for academia sake, as after a week of beating my head against a wall trying to figure it out, I had nothing.
edited to change things
Thanks,
Corticus
This message was edited by Corticus on 2002-12-08 12:45
I've got this tricky query I'm trying to do. I have actually accomplished the retrieval of the data through means of reorganizing the data into new tables, and querying these, but I would like to know if a query could accomplish what I want right from the original table.
Anyways, here's the field names:
LastName/FirstName/Period/Professor/Course/Exempt(Y/N)
and data would look like this;
Doe/John/1/Mr. Smith/English/Y
Doe/John/2/Mr. James/Math/Y
Adams/Julie/1/Mrs. Jones/Chorus/N
I need to retrieve the students name for students who are exempt from either periods 1 and 2, or periods 3 and 4, or periods 5 and 6. In the case of the above data, John Doe would retreived.
What's tricky is neither the student, nor the course have a primary ID. The data was inherited in this format and consists of 8,063 records.
I used append queries to reorganize the data so there is a teacher table, each with a pka, and a course table, each with a pka, and then used an update querry to attach these pkas to the original table described above. I don't have the SQL I used handy but I'll post if it anybody cares.
Anyways, I would like to know how to query this table directly just for academia sake, as after a week of beating my head against a wall trying to figure it out, I had nothing.
edited to change things
Thanks,
Corticus
This message was edited by Corticus on 2002-12-08 12:45