>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?
>
>thanks
>
>brenda
Brenda,
There are many ways to do it and one is infamous SQL. You say there is a specific customer key. You could use it for a generic code :
lcKey = "SomeKey"
_GetTest("myTable")
_GetTest("myOther")
_GetTest("myTable1")
function _GetTest
lparameters tcTableName
select * from (tcTableName) ;
where myKey = lcKey ;
into table ("Test_"+tcTableName)
Cetin