Need help with an SQL query (joining to lookup table twice)
maleksAug 19 2008 — edited Aug 20 2008Hi
How would I go about doing this:
I have three tables, lets call them edu, stu and text.
Lets say that the stu table contains the field CLASSNO
The table edu contains the fields CLASSNO and SCHOOLTYPE
The table text contains the fields CODE and CLEARTEXT.
The fields text.CODE and edu.SCHOOLTYPE are related, if for example the field SCHOOLTYPE contains the value 100 I can check what 100 means by looking at the table TEXT using something like:
select text.CLEARTEXT from edu, text WHERE text.CODE = edu.SCHOOLTYPE
How would I go about getting the data from the text.CLEARTEXT field when I mix in the stu table as I need to make sure I get the text.CLEARTEXT where the value of stu.CLASSNO and edu.CLASSNO are the same.
Thanks
Message was edited by:
alekz