Separate import data into two linked tables

Discussion created by decenright on Nov 20, 2015


I would like to separate imported data from a temporary import table into two further separate linked tables.


The temp import table has a field where values can be either 0 or 1. The first/top record would be 0 and then all the following records would be 1 (representing a package number as 0 and parts within the package as 1). Every time data is imported into the temp table it will be in this format.


My objective is to populate a package table with records that link to the packages parts from the data periodically dumped into the temp table with some kind of script.


My thinking is to maybe use the import records script step with a find set based on the 0 or 1 into two tables with a primary and foreign key but how to create the foreign key in either table I am not sure.


I would really appreciate any suggestions.