Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set relationship and copy
Message
De
14/12/2006 16:04:42
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01177790
Message ID:
01177792
Vues:
7
>Hi,
>I have two tables, table1 has the following structure
>Table1: dog, howtall, howfast, furtype
>Table2: cats, howtall, hasclaws, food
>
>I have set the relationship between the two, using the field howtall
>
>Now here is my problem, after having set the relationship, I want to copy
>the table to a new table
>
>copy to newtable a->dog, a->howtall, b->cats, b->howtall
>
>But I get an error. How can I copy selected fields from two tables?
>
>Thanks
>Steve

You have howtall twice.
copy to newtable a.dog, a.howtall, b.cats
BTW, why not use SQL syntax, where you can do everything in one line?
Select dog, table1.howtall, cats from table1 inner join table2 on table1.howtall=table2.howtall;
  into table newtable
Or
Select dog, table1.howtall, cats from table1, table2 where table1.howtall=table2.howtall;
  into table newtable
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform