APPEND FROM ARRAY

From Recital Documentation Wiki
Revision as of 14:03, 10 November 2009 by Helengeorge (Talk | contribs)

Jump to: navigation, search

Purpose

Append records to current table from an array


Syntax

APPEND FROM ARRAY <array>

[FOR <condition>]

[WHILE <condition>]

[REINDEX]


See Also

AAVERAGE(), ACHOICE(), ACOPY(), ADEL(), ADIR(), AFIELDS(), AFILL(), AINS(), ALEN(), AMAX(), AMIN(), APPEND FROM, ASCAN(), ASORT(), ASUM(), AVERAGE, COPY TO ARRAY, DECLARE, DIMENSION, GATHER, INDEX, 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.


Products

Recital Server, Recital