Hey people, I've got a quick question regarding a problem I've come across writing an SQL query.
I've got two tables, one with various fields including say Country of Origin ID and Country of Destinination ID. And another table with two fields, 1) Country ID and 2) Country name. The idea is that when displaying data from the first table you look up the country names in the the second table using the ID number.
How exactly do I specify the WHERE statement for looking up both Country fields? Because once you specify that Country ID = Country of Origin ID, I don't see how you can then say that Country ID = Country of Destination ID (which would only return entries where the two IDs are equal). My guess is that I will need to use the AS statement somewhere. Hope one of you can help.
I've got two tables, one with various fields including say Country of Origin ID and Country of Destinination ID. And another table with two fields, 1) Country ID and 2) Country name. The idea is that when displaying data from the first table you look up the country names in the the second table using the ID number.
How exactly do I specify the WHERE statement for looking up both Country fields? Because once you specify that Country ID = Country of Origin ID, I don't see how you can then say that Country ID = Country of Destination ID (which would only return entries where the two IDs are equal). My guess is that I will need to use the AS statement somewhere. Hope one of you can help.