Some tables are created during the execution of a job, and others must be created by the user before the job begins. The log table is created automatically when you run the Update job script. Target tables must exist on the database when the Update operator job is executed.
If you have not specified error and work tables (specifying them is optional), the Update operator automatically creates the names of the error and work tables.
If you specify only one target table, use VARCHAR syntax, as follows:
VARCHAR TargetTable = 'ttname'
If you specify more than one target table, you can also use VARCHAR syntax, as follows:
VARCHAR TargetTable = ['table1', 'table2', ..., 'tableN']
You can, if you wish, use ARRAY syntax, as follows:
VARCHAR ARRAY TargetTable = ['table1', 'table2', ..., 'tableN']
- The first error table is ttname_ET
- The second error table is ttname_UV
- The work table is ttname_WT
where ttname is the name of the corresponding target table.
You cannot specify more error or work tables than there are target tables already defined, but you may specify fewer.
If the following is specified when no other error or work table specifications exist,
VARCHAR TargetTable = ['targtable1', 'targtable2', 'thirdtable']
the Update operator creates the following error tables and work tables:
targtable1_ET targtable1_UV targtable1_WT targtable2_ET targtable2_UV targtable2_WT thirdtable_ET thirdtable_UV thirdtable_WT
Notice that each set of two error tables and one work table belong to a particular target table; the naming convention preserves the uniqueness of the tables associated with a target table.
If you specify the following, the Update operator creates the necessary missing table names:
VARCHAR TargetTable = ['ttname1','ttname2','ttname3'] VARCHAR ErrorTable1 = ['error_1'] VARCHAR ErrorTable2 = ['error_2'] VARCHAR WorkTable = ['work_1','work_2']
If you specify more error table names or work table names than there are target table names, the Update operator issues an error message and terminates the job.