Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining of two tables
Message
 
À
26/11/2001 11:49:28
Michael Harris
Harris and Harris Consultants
Temple Hills, Maryland, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00585785
Message ID:
00585891
Vues:
21
>I need to combine table A with table B into table C. Both tables have the following fields in common: Year, Borrower, Period, Rownum, and exchange(which is named "e" in table A and "en" in table B). The trick is I have to match records from table A with table B into each record in table C and I also have to include the records in both tables that do not match. Can I do this with one SQL command? If anyone can help me, thanks in advance.
>
>Michael E. Harris

Michael,
SELECT TableA.*, TableB.* ;
  FROM TableA FULL OUTER JOIN TableB ;
    ON TableA.Year = TabelB.Year ;
   AND TableA.Borrower = TableB.Borrower ;
   AND TableA.Period = TableB.Period ;
   AND TableA.RowNum = TableB.RowNum ;
   AND TableA.e = TableB.En ;
INTO TABLE TableC
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform