JoinQuery

Takes 5 parameters, DestinationQuery, SourceQuery, DestinationMatchField, SourceMatchField, Mode

Usage:

DestinationQuery, SourceQuery, DestinationMatchField, SourceMatchField, Mode
DestinationQuery, SourceQuery, DestinationMatchField, SourceMatchField, ["All"]

Description:

For each Record in DestinationQuery, if a record is found in SourceQuery where DestinationMatchField equals SourceMatchField the contents of the Record in SourceQuery will be copied to the Record in DestinationQuery.

The record order of SourceQuery will be sorted by SourceMatchField during this operation.

Mode must be one of the following values:

Note that as part of the prep work for the join, the SourceQuery will be sorted by the SourceMatchField, and SourceMatchField will be moved to the first field position in SourceQuery.

A limitation on the contents of SourceQuery is that it may not contain $R or $F characters. If working with binary data in SourceQuery, either use Plus8Encode before the join followed by Plus8Decode after the join, or consider alternative approaches.

If any Field names exist in both the DestinationQuery and the Source Query, the duplicate Fields from the SourceQuery will be given a .Source suffix as they are created in the DestinationQuery. The Field names in the SourceQuery itself are not changed.

 Example:

JoinQuery   "Me.Output", "Me.GetData", "Alias", "DataAlias"