Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to combine 3 tables into 1?
Message
From
13/07/1999 20:03:40
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
13/07/1999 13:52:01
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00240803
Message ID:
00241088
Views:
19
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform