MOVE_PARTITIONS_TO_TABLE

Moves partitions from one table to another.

Syntax

MOVE_PARTITIONS_TO_TABLE (
    '[schema.]source-table',
    'min-range-value',
    'max-range-value', 
    '[schema.]target-table'
)

Parameters

schema

Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example:

myschema.thisDbObject
source‑table The source table of the partitions to move.
min‑range‑value The minimum value of the partition to move. To move one partition, the minimum and maximum values must be the same.
max‑range‑value The maximum value of the partition to be moved. To move one partition, the minimum and maximum values must be the same.
target‑table

The target table of the partitions to move. If the table does not exist, Vertica creates a table from the source table's definition, by calling CREATE TABLE with LIKE and INCLUDING PROJECTIONS clause. The new table inherits ownership from the source table. For details, see Replicating a Table.

Privileges

If the target table does not exist, you must have CREATE privileges on the target schema, to enable table creation. One of the following conditions is also required:

Table Attribute Requirements

The following attributes of both tables must be identical:

Table Restrictions

The following restrictions apply to the source and target tables:

Examples

See Archiving Partitions.