Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help to copy free table struct and then insert records
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00356247
Message ID:
00356289
Views:
11
>Want to create a small program to use for debugging client data problems. have about 15 free tables with a common customer number key. when the client has a problem with a specific customer, i want to pull off all the data for that customer number from the 15 tables into 15 test tables. i would then just manually copy the 15 tables onto my machine for testing with the debugger.
>
>using the STRUCT to make the table structure. what is the easiest way to copy the specific records from the original table into the test table? also, i have 15 peices of code, is there a way to make a generic peice of code where i just have data names for the original and test tables?
>
>is there any easier way of doing this?

Personally, I would use SELECT * FROM ... WHERE CUSTNUM = ?nCustNum INTO TABLE TEST1 into some TEMP directory and do this for all the 15 tables. Put all 15 select commands into 1 procedure then just DO THATPROC and pass the CustNum as a parameter. As long as you do not specify a DATABASE name in the SELECT, the tables will be created as free tables.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform