Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is This Possible????
Message
De
13/05/1999 10:14:30
 
 
À
13/05/1999 09:52:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00218360
Message ID:
00218365
Vues:
20
>* There is no relation between the two tables via a primary key and candidate key. The relationship between the two tables is many-to-many.
>
>Example: an office has many voters and voters can be associated with many offices.
>

How are they associated? Usually a many-to-many relationship has a third linking table. Without seeing a schema this is hard to envision.

>**I am trying to accomplish the following:
>
>I have a search form that selects a specific office and fires my offices form. When the user arrives to this office form, he/she can view all the detials of the specific office selected.
>
>I am trying to add a new feature to this form. I want to include a grid on this offices form that provides voter demographic information, for each office. Now, our company knows that we have to build thousands of views to extract voters information [one for each office], in order to set filters on the voters to only bring up the voters that can vote in the specific office "district" that was selected by a user on the search form.

I don't understand this relationship... are you saying each office has many districts? Or, is an office and a district the same entity but a different candidate key?

>Here is the trick>> To have the grid be populated with voter information for that specific office without having a linking key. We know what voters are associated with a specific office based on a district number.
>

If voters are associated with an office based on district number, that sounds like a relationship to me. You shouldn't need 'hundreds' of views, you need one view on the voters table with a filter like...

v_voters.district == ?v_office.district

Is that not the relationship for what you are doing? As you move through the v_office view, you requery the voters view which will be populated with voters in that offices' district. What am I missing?

>Thank in advance for any comments or ideas on this situation.

HTH,
BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform