Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql and full join
Message
De
26/02/2001 23:47:28
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
26/02/2001 23:46:39
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00479871
Message ID:
00479901
Vues:
32
>>hello all:
>> I am using a sql and full join to combine all the records from 2 tables which have the same data structures. I am getting a syntax error could anyone help? Let's say there are 2 fields in bother of the tables: total and material. What will be the correct syntax: select total,material from table1 full join table2 on what will be the condition ? thanks.
>>sherry
>
>SELECT ;
>    T1.Total AS T1Total, T1.Material AS T1Material, ;
>    T2.Total AS T2Total, T2.Material AS T2Material ;
>    FROM MyTable T1 ;
>    FULL JOIN MyOtherTable T2 ;
>    ON T1.Total = T2.Total AND T1.Material = T2.Material ...
Sherry, forgot to say that if the tables are exactly the same you might rather have a UNION or UNION ALL.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform