Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to combine 3 tables into 1?
Message
De
14/07/1999 15:02:05
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
13/07/1999 13:52:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00240803
Message ID:
00241438
Vues:
16
>I've never needed to do this, but it looks like the set relation command will assist you.
>
>If you want to combine record 1 in table 1 with record 1 in table 2 with record 1 in table 3 and record 2 in table 1 with record 2 in table 2 with record 2 in table 3 and so on, you should be able to do this:
>
>Select table1
>set relation to recno() into table2
>set relation to recno() into table3 additive
>list all table1.field1, table1.field2, table2.field1, table2.field2, table3.field1, table3.field2
>
>Is that kinda what you are looking for?

Todd, this will show only recno("table1") records, and if there are more records in table2 or table3, they wouldn't show up. You'd have to pick the one with the most records, and set relation from that one into the other two.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform