Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need help with appending tables
Message
 
À
05/02/1997 10:54:00
David Wang
Sullivan Environmental Consulting, Inc.
Alexandria, Virginie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00019354
Message ID:
00019357
Vues:
34
>I have two tables with similar fields that I want to merge into one table. For example, my first table has fields: description, xvalue, yvalue. My second table has fields: description, xvalue, yvalue, codenum. I want one table with the fields description, xvalue, and yvalue. When I use the SELECT - SQL command, I get two fields for description, xvalue, and yvalue, because they are from different tables (i.e., descriptionA, desciptionB, xvalueA, xvalueB, etc.).
>
>Any suggestions? Thanks in advance!
Hi Syndi,
Try this:

SELECT * FROM first_table ;
WHERE my_condition ;
UNION ;
SELECT second_table.description,;
second_table.xvalue,second_table.yvalue;
WHERE other_condition

Hope this help.
Good Luck.
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform