APPEND FROM ARRAY Command
Adds one record to the currently selected table for each row in an array and fills each record with data from the corresponding array row.
APPEND FROM ARRAY ArrayName [FOR lExpression] [FIELDS FieldList | FIELDS LIKE Skeleton | FIELDS EXCEPT Skeleton] |
Parameters
- ArrayName
-
Specifies the name of the array that contains the data to be copied to the new records. New records are added to the table until all rows in the array are appended.
- FOR lExpression
-
Specifies a condition for appending records from the array. lExpression must contain the name of a target field in its conditional expression.
Before a row of the array is appended to a record in the table, the array element corresponding to the target field specified in lExpression is checked to determine whether that array element meets the condition in lExpression. If the array element satisfies the condition, a record is appended.
If the array element does not satisfy the condition, the array row is not appended and the next row in the array is checked to determine whether it meets the condition.
- FIELDS FieldList
-
Specifies that only the fields in FieldList are updated from the array. The first field in the list is updated with the contents of the first element in the array, the second field is updated from the second element, and so on.
- FIELDS LIKE Skeleton
-
Specifies that fields that match the field skeleton Skeleton are updated from the array.
- FIELDS EXCEPT Skeleton
-
Specifies that all fields except those that match the field skeleton Skeleton are updated from the array.
The field skeleton Skeleton supports wildcards. For example, to specify that all fields that begin with the letters A and P are updated from the array, use the following:
Copy Code
APPEND FROM ARRAY aMyArray FIELDS LIKE A*,P*
The LIKE clause can be combined with the EXCEPT clause:
Copy Code
APPEND FROM ARRAY aMyArray FIELDS LIKE A*,P* EXCEPT PARTNO*
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic