SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Utilities
HP NonStop SQL/MX Reference Manual540440-003
5-10
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;