The FOR EACH RECORD IN ORDER BY statement:
-
The FOR EACH RECORD IN ORDER BY statement retrieves and loops only on the first occurrence of a field in a record
-
The FOR EACH RECORD IN ORDER BY statement loops only on the first occurrence of a field in a record
-
The FOR EACH RECORD IN ORDER BY statement retrieves and loops on all the occurrence of a field in a record
-
The FOR EACH RECORD IN ORDER BY statement retrieves and loops on only the last occurrence of a field in a record
The FOR EACH RECORD IN ORDER BY statement both retrieves and loops through only the FIRST occurrence of a field in each record, not all occurrences. This is important when you want to process unique records without duplicate field values. Option A correctly describes this behavior. Options B, C, and D are incorrect because the statement doesn't just loop without retrieval, doesn't process all occurrences, and isn't limited to the last occurrence.
In Model 204, the FOR EACH RECORD IN ORDER BY statement retrieves records and loops over them, but for a multiply-occurring field used in the ORDER BY, it only considers/loops on the first occurrence of that field within each record — it doesn't iterate every occurrence or specifically the last one. This distinguishes it from statements designed to process all occurrences or only the last occurrence of a repeating field.