Copies records from an existing table to the end of the current table.


APPEND FROM <filename>
[FOR <condition>]


The name of the file whose records you want to append to the current table.

FOR <condition>

Restricts APPEND FROM to records in <filename> that meet <condition>. You can specify a FOR <condition> only for fields that exist in the current table. dBASE Plus pretends that the record is appended, then evaluates the <condition>. If it fails, the record is not actually appended.


Specifies the default file extension, and for text files, the text file format. For example, if you specify a .DBF file as the <filename> and TYPE PARADOX, the TYPE is ignored because the file is really a dBASE file. The TYPE keyword is included for readability only; it has no effect on the operation of the command. The following table provides a description of the different file formats that are supported:




A dBASE table. If you don't include an extension for <filename>, dBASE Plus assumes a .DBF extension.


A Paradox table. If you don't include an extension for <filename>, dBASE Plus assumes a .DB extension.


A System Data Format text file. Records in an SDF file are fixed-length, and the end of a record is marked with a carriage return and a linefeed. If you don't specify an extension, dBASE Plus assumes .TXT.


A text file with fields separated by commas. These files are also referred to as CSV (Comma Separated Value) files. Character fields may be delimited with double quotation marks; the quotes are required if the field itself contains a comma.

Each carriage return and linefeed indicates a new record. If you don't specify an extension, dBASE Plus assumes .TXT.

WITH <char>

Indicates that character data is delimited with the character <char> instead of with double quotes. For example, if delimited with a single quote instead of a double quote, the clause would be:



Indicates that data is separated with spaces instead of commas, with no delimiters.



Rebuilds all open index files after APPEND FROM finishes executing. Without REINDEX, dBASE Plus updates all open indexes after appending each record from <filename>. When the current table has multiple open indexes or contains many records, APPEND FROM executes faster with the REINDEX option.


Use the APPEND FROM command to add data from another file or table to the end of the current table. You can append data from dBASE tables or files in other formats. Data is appended to the current table in the order in which it is stored in the file you specify.

When you specify a table as the source of data, fields are copied by name. If a field in the current table does not have a matching field in the source table, those fields will be blank in the appended records. If the field types do not match, type conversion is attempted. For example, if a field named ID in the current table is character field, but the ID field in the source table is numeric, the number will be converted into a string when it is appended.

When appending text files, SDF or DELIMITED, there is no data type in the source file; everything is a string. For non-character fields, the strings should be in the following format to match the data type in the table:

For logical or boolean fields, the letters T, t, Y, and Y indicate true. All other letters and blanks are considered false.

Dates must be in the format YYYYMMDD.

If the field of the current table is shorter than the matching field of the source table, dBASE Plus truncates the data.

If SET DELETED is OFF, dBASE Plus adds records from a source dBASE table that are marked for deletion and doesn't mark them for deletion in the current table. If SET DELETED is ON, dBASE Plus doesn't add records from a source dBASE table that are marked for deletion.

When importing data from other files, remove column headings and leading blank rows and columns; otherwise, this data is also appended.


Use the UpdateSet objectís append(†) or appendUpdate(†) method to append data from other tables.