Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combine 2 DBF to a text file
Message
 
 
To
05/12/1999 14:48:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00298932
Message ID:
00298935
Views:
15
Cheong,

Use a cursor to get all the fields you want and create the text file from the cursor.
SELECT table1.*, table2.field1, table2.field2 ; && all table2 fields but CustID
   from table1 ;
   inner join table2 ;
      on table1.CustID = table2.CustID ;
   into cursor temp1 ;
   order by CustID
copy to textfile.txt type sdf
>I have 2 dbf table each having different fields, type and lengths but have a common field CustID. My aim is to combine both table into a text file in the following order:-
>record 1 of table 1 followed by record 1 to 4 of table 2
>record 2 of table 1 followed by record 5 to 6 of table 2
>record 3 of table 1 followed by record 7 to 9 of table 2
>
>I tried copy to textfile type sdf but I couldn't get what I wanted. Please help. Tks
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform