Scripting - Datacomp
This runs the Data Compare function in unattended mode.
The syntax of the Datacomp script function is not given. This is a complicated function. It is suggested that you:
- use the Data Compare window to set up (and test) the compare as per your requirements
- click on the File > View Compare Options, or Save Compare Options. AQT will generate a Datacomp function that will do the load as per the options you have specified on this window. You can incorporate this function in your batch script, or run it from the Run SQL window.
Specifying Primary Key and Columns
When running the datacomp function in batch, there are some parameters that do not need to be specified:
- you do not need to specify the Primary Key (pk) parameter if the tables have primary keys defined for them. AQT will automatically determine the primary key for the tables.
- you do not need to specify the columns to be compared (cols) if you are wishing to compare all columns in the tables.