CopyUnique

Takes four parameters, DestinationQuery, SourceQuery, UniqueField, UniqueValue

Description:

Copies all data in the SourceQuery into the DestinationQuery, where the UniqueField value of records in SourceQuery matches UniqueValue.

Example:

CopyUnique "UserData.Person" "MemTab.Person", "MemTab.Person.Alias", ThisUniqueVal