Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combine two tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00066400
Message ID:
00066448
Vues:
37
>I have two tables. One of them has 4 fields in which 3 are product codes, and 1 is the order number. The product name for each of the code can be found by referring to table 2 which has product codes and product names. I need to create a view that shows order number, product name for code 1, product name for code 2, and product name for code 3. Moreover, not every record has all three product codes. Some only have one, and some have 2. Can anyone help?
>
>Chu

Chu, if you are working in VFP5 then you can set up the SQL using the "left outer join" syntax. However, you will probably have to do it outside a view and then use Create View to put the view in the DBC. I don't think the View wizard will handle anything this complicated. You may also have to have the product table opened under separate aliases for the different codes or use a series of SQL-Select statements. If this is true, then you may need to put the code in a PRG or a method instead of a view.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform