Difference between revisions of "APPEND FROM ARRAY"
Yvonne.milne (Talk | contribs) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Append records to current table from an array | Append records to current table from an array | ||
− | |||
==Syntax== | ==Syntax== | ||
Line 12: | Line 11: | ||
[REINDEX] | [REINDEX] | ||
− | |||
==See Also== | ==See Also== | ||
− | [[AAVERAGE | + | [[AAVERAGE()]], [[ACOPY()]], [[ADEL()]], [[ADIR()]], [[AFIELDS()]], [[AFILL()]], [[AINS()]], [[ALEN()]], [[AMAX()]], [[AMIN()]], [[APPEND FROM]], [[ASCAN()]], [[ASORT()]], [[ASUM()]], [[AVERAGE]], [[COPY TO ARRAY]], [[DECLARE]], [[DIMENSION]], [[GATHER]], [[IN_ARRAY()]], [[INDEX]], [[IS_ARRAY()]], [[LOCAL]], [[PRIVATE]], [[PUBLIC]], [[REINDEX]], [[RELEASE]], [[RESTORE]], [[SAVE]], [[SCATTER]] |
− | + | ||
==Description== | ==Description== | ||
Line 28: | Line 25: | ||
====REINDEX==== | ====REINDEX==== | ||
The REINDEX keyword can be used to automatically call the REINDEX command after the APPEND FROM ARRAY has completed. | The REINDEX keyword can be used to automatically call the REINDEX command after the APPEND FROM ARRAY has completed. | ||
− | |||
==Example== | ==Example== | ||
Line 40: | Line 36: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category: | + | [[Category:Declaring Variables and Arrays]] |
− | [[Category: | + | [[Category:NoSQL Commands]] |
− | [[Category: | + | [[Category:Data Import]] |
− | + |
Latest revision as of 12:38, 4 February 2013
Contents
Purpose
Append records to current table from an array
Syntax
APPEND FROM ARRAY <array>
[FOR <condition>]
[WHILE <condition>]
[REINDEX]
See Also
AAVERAGE(), ACOPY(), ADEL(), ADIR(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM, ASCAN(), ASORT(), ASUM(), AVERAGE, COPY TO ARRAY, DECLARE, DIMENSION, GATHER, IN_ARRAY(), INDEX, IS_ARRAY(), LOCAL, PRIVATE, PUBLIC, REINDEX, RELEASE, RESTORE, SAVE, SCATTER
Description
The APPEND FROM ARRAY command allows you to append records to the current table from the contents of a previously declared two-dimensional array of the specified name, <array>. The data types and sizes of elements in the rows of the arrays must correspond to the fields in the table.
FOR <condition>
If the FOR <condition> clause is specified, only those elements in the rows which satisfy the specified <condition> will be appended.
WHILE <condition>
The WHILE <condition> clause can be used to restrict the number of records appended. When the condition becomes false, the APPEND FROM ARRAY operation will stop.
REINDEX
The REINDEX keyword can be used to automatically call the REINDEX command after the APPEND FROM ARRAY has completed.
Example
use suppliers declare cust[reccount(), fcount()] copy to array cust copy structure to customer use customer append from array cust for also_cust = .T.