range copy


The range copy statement copies records in the current range from a source table to a destination table. Only fields common to both tables will be copied. Common fields are those that have the same resource ID. The range copy statement will use an exclusive range.


range copy table source_table to table dest_table {by key_name|by number expr}


table source_table – The table from which records will be copied.

table dest_table – The table to which records will be copied.

by key_name | by number expr – Identifies the key for which the range has been set up on the source table. Keys can be identified by their name (by key_name) or by their numeric position in the table definition (by number expr). If no key is specified, the first key of the source table is used.


If both the source and destination tables are SQL tables, the range copy statement will run as a single SQL statement on the server, greatly improving performance. Otherwise, records in the range will be copied individually.

If a database trigger is registered for either the source or destination table, records will be copied individually.

Documentation Feedback