AnsweredAssumed Answered

Copy data one table to another

Question asked by Stu412 on Jun 16, 2017
Latest reply on May 11, 2018 by TKnTexas55

Hi there


I have a routine which requires data to be copied from a temporary scratch table (used for data validation, end user cleansing and verification etc) to the main data table.


Currently this is handled by a pretty simple loop in a script which goes something like this:


On scratch table

Go to first record


     Set variable 1

     Set variable 2


     Set variable 6


     Go to destination data table


     Create new row

     Set field [1 ; $variable1]

     Set field [2 ; $variable 2]


     Set field [6 ; $variable 6]


     Go to layout [Scratch temp layout]

     Go to next record ; exit after last


end loop


Put simply, this takes forever for only 78 rows to go into the table.  Around 3-4 minutes in a multi user environment user FMS 13.  At this time, I am the only user on the network.


There must be a better way of getting $variables 1-6 in to new fields on new records in the destination table.  I have considered parsing data from a virtual list, but I already have 130000 rows of existing data in the destination table which could be an issue to a fundamental change like this.


Any ideas gratefully appreciated.