Copy records from a database to a temp-table
- Last Updated: January 21, 2021
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
You can populate a temp-table by copying records into it from the database. You
can copy the entire record or select fields. To copy a record from the database table to
the temp-table you must:
- Create a temp-table record.
- Copy the record from the database (source) into the temp-table record (target).
Syntax for creating a temp-table record
The basic syntax for creating a temp-table record is the same as for creating a
database table record:
Where ttName is the name of the
temp-table. This creates the temp-table record.
CREATE ttName. |
See the CREATE statement for more detail.
Syntax for buffer-copy
Use the following syntax to copy a database record buffer into a temp-table record buffer:
BUFFER-COPY source TO target. |
See the BUFFER-COPY statement for more detail.
The following example code shows how to populate the ttCustomer temp-table from the database. Note that the BUFFER-COPY only copies the matching fields; fields in the
database or temp-table that do not match the other are ignored.
|