AnsweredAssumed Answered

Exporting Related Records

Question asked by embeco on Jun 12, 2017
Latest reply on Jun 12, 2017 by siplus

I have a master inspection record and many related section records each in their own tables. There is only one matching section record for each inspection record. I am searching for a set of inspection records for a date range which I then want to export to an Inspection table in another directory (Archived Files).

I also need  that the related section tables entries also export to their associated tables in the archived files directory.

Basically I am exporting (archiving) an entire system database for inspections for a particular date range.

I thought that I could find the inspections I wanted to export and then when I exported section records it would only export RELATED section records for the Inspection found set. Evidently this is not the way it works.

Do I have to issue a find command for each section table to go out and find the one section record related to my inspection record? And I suppose that I will have to do this for each inspection record in the Inspection found set. In other words a big loop??


Read the first inspection record in the found set and export it to the Inspection table

Find the related Section 1 record and export it to Section 1's table

Find the related Section 2 record and export it to Section 2's table...  Etc

Loop back to the next Inspection record

Is there any easier way to do this?