Information générale
Catégorie:
The Mere Mortals Framework
>Imagine that I have a Countries Table and a States (from Countries) Table. Is there any way to check if a given State is Unique within this Country? For example, I cannot include a "CA" State in "US", but I can in "SE".
>
>Regards,
Suppose the countries table has two fields namely CountryID, and CountryName.
Suppose the states table has two fields namely CountryID, and StateName.
SELECT CountryID, StateName, COUNT(Statename) FROM Country INNER JOIN State ON Country.CountryID= State.CountryID GROUP BY CountryID, Statename INTO CURSOR CountState
Use the table entitled CountState to determine whether or not a state is unique within a given country
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement