The Query Options Dialog Box

The Query Options dialog box is used to specify how you want the results of a query migrated. For example, you can specify what action Migrate should take if the destination table already exists, or how many total records from the result should be copied.

The Query Options dialog box contains the following controls:

Destination This group box displays the destination information for the selected query.
  Auth ID Enter the AuthID associated with the table produced by the query.
  Table Enter a table name for the table produced by the query.
  Tbl Space Enter the table space name for the result of the query.

If a table space name isn't specified, the destination table name is used.

  Database Enter the database name for the table produced by the query.

If a database name isn't specified, the default database name "DSNDB04" is used.

If Table Already Exists Use the If Table Already Exists group box to determine what to do if the there is an existing table with the same name as the table produced by the query.
  Abort Select this option if you want Migrate to terminate the migration if the destination table already exists.
  Append Data Select this option if you want Migrate to append the new table to the existing destination table. If the destination table has no primary key, all records are appended to the destination. You can use this option with the No Data option (see below) to migrate just an index.
Note:

You can end up with duplicate records if you use this option on a table without a primary key.

  Replace Data Select this option if you want Migrate to replace all existing records in the destination table with records from the source table. All data in the existing table will be deleted.
  Replace Table Select this option if you want Migrate to drop the destination table and create a new table containing the result of this migration.
  Update No Insert Select this option if you want Migrate to update data only if the row with they key already exists.
  Update Insert Select this option if you want Migrate to update existing data or insert the row if it doesn't already exist.
  Delete Match Select this option if you want Migrate to delete an existing matching row.
  Limit Data To Select the number of records you want to copy.
  • Select All Rows if you want to migrate all data records of the query result.
  • Select No Data to migrate none of the records from the source table to the destination. You might use this option to create an "empty" destination table (which will have a structure identical to the source) into which you can selectively copy records using Migrate's query feature. Or, you might use it to copy certain table attributes without copying any data.

    The behavior of this option depends on the following:

    • If the destination table does not exist, an "empty" table is created.
    • If the destination table exists, and the Replace Data or Replace Table option is used, the destination table's existing records are deleted and no records are copied (an "empty" table is created).
    • If the destination table exists, and the Append Data option is used, no records are copied to it (you could use this combination of options to copy just an index).
  • Select First N Rows if you only want to migrate the first N records from the source table to the destination.
  • Select Every Nth Row if you want to copy every N records from the source table to the destination.
  Commit Work After Specify the number of records Migrate should accrue before permanently writing them to disk (i.e., issuing a COMMIT statement). You can specify any number between 0 and 32,767. High Commit Work After values produce a faster migration but result in fewer records successfully written should the migration be interrupted.