SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)

SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual691117-005
2-199
Examples of DUP
Examples of DUP
This example copies the partitions of the source table (using a different catalog and
schema) to the same locations:
DUP mycat.myschema.mytable1 TO mycat1.myschema1.*;
This example copies the partitions of the source table on $data1 and $data2 to
the partitions of the target table on $data2 and $data3 respectively. If there is no
PART clause for a specific volume and source partitions exist on that volume, the
target partitions are created on the same volume as the source partitions.
DUP mycat.myschema1.mytable TO *.myschema2.*
LOCATION (PART $data1 TO $data2, PART $data2 TO $data3);
This example copies the partitions of the source table to the same locations. The
target table, if it exists, is dropped, and a new one is created.
DUP mycat1.myschema.mytable TO mycat2.*.*,TARGET PURGE;