Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexes with fields from another table
Message
De
21/02/2001 09:51:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00477736
Message ID:
00477947
Vues:
26
>In the equipment table, you should have a field that contains the Primary Key ID of the vendor. If you do this, you will not have to replace the name of the vendor in the Equipment table when the name of the vendor is changed in the Vendor table.

I keep a primary key in the equipment table.

>
>Now all you have to do is join the tables to create a local view --
>
>create local view MyViewName as select list_of_fields from Equipment join Vendor on Equipment.Vendor_ID = Vendors.KeyID where Equipment.Vendor_ID = ?nVendor_ID order by whatever
>

One of my tables, for motors, has to link to vendors,equip,mcc,dcs & commain; five different Key IDs, five different Joins.

My experience is when I have more than two "Left Outer Joins" in a single view statement that those beyond the first two do not work. They enter the same single value over and over. That is it enters the same vendor for each record even when the Key ID points to a different one.

Do I series the local views to avoid this, that is making a local view from a local view which itself is made from a local View?

Also how do you handle updates made by my user? He changes the vendor assigned to the current record (changes the vendors_id in the current record). Do I then requery the entire view to get it into the proper order and show the change to the user?

My users want put the list in order by vendors to easily find the empty ones at the top of a grid.

My experience with local views is limited to editing the child records in a one to many relationship. Very simple and straight forward.

My family is from Birdville, Texas. I believe it was close to Hurst. For some reason they changed the name.

>>All,
>>
>>I have tables in which I want to have an index containing fields from another table.
>> ....
Best Regards
Don Simpson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform