Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UniqueValue
Message
From
14/04/2004 18:23:20
Dave Nantais
Light speed database solutions
Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00894733
Message ID:
00894963
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform