Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UniqueValue
Message
De
14/04/2004 18:23:20
Dave Nantais
Light speed database solutions
Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00894733
Message ID:
00894963
Vues:
13
>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
Fil
Voir

Click here to load this message in the networking platform