You are here: Commands > Join > Preparing Key Fields

Preparing Key Fields

The Join command requires that you sort the secondary table in ascending sequence on the key fields. If the secondary table is not already sorted, select the Presort Secondary Table checkbox in the Join dialog.

While not mandatory, it is also recommended that you sort the primary table on the key fields. You can do this by selecting the Presort Primary Table checkbox in the Join dialog. Alternatively, you can index the primary table instead of sorting it.

You can use Join with an unsorted primary table, but for large joins, this would increase processing time dramatically. If the primary table is partially sorted on the key field, for example, when a table is sorted by account code for individual months, processing time increases, but not to the same extent.

You can select more than one key field. You might want to do this, for example, if you had one supplier with the same vendor number in different locations. To capture all records for this vendor, regardless of location, you could select both supplier and location fields as key fields. You would then also need to select two corresponding key fields in the secondary table.