Previous Topic

Next Topic

Book Contents

Book Index

Data Compare

The Data Compare tool allows you to compare the data between two tables, views or queries. It can be invoked from the Database Explorer by clicking on Tools > Compare Data, or the Compare Data icon.

The Data Compare tool is part of the Extended Edition of AQT, which is a separately purchasable component of AQT. If you have not purchased the Extended Edition you can still use Data Compare, however you will be limited to comparing 100 rows.

Data Compare has the following features:

Data Compare

Specifying the Tables or Queries

You use the Compare and Compare To boxes to specify the tables or queries to be compared. Click on the three-dots button to select a table, or type the table name into the Table text-box.

Unique Key

In order to compare tables, the tables must have a column (or set of columns) that uniquely identifies each row in the tables. This is used to match the rows from the two tables. AQT will get this key for you automatically if your table has a primary key, unique key, or user-defined key. Otherwise you will need to specify this.

If the table doesn't have a primary key, or you are comparing a query, you can specify which columns comprise the unique key in two ways:

If you are comparing a query, the query must return the data in the order of the unique key columns (eg. must have an order by keycol1, keycol2 clause).

Filter Rows

The Filter Rows is used to apply a search condition to your table. You would use this to exclude rows that you do not wish to be included in the Compare.

Code this as a Where clause but without the Where keyword. Examples:

cust_code is not null

order_number > 0 and order_date > '1998-02-05'

Report File

AQT can generate a report file giving a text-based report of the Data Compare. The report file is mainly useful when running the Data Compare in batch.

Other Options

Order-By Mask

This option appears on the More Options tab. It is discussed in the section Collation Order Problem.

Saving / Retrieving Compare Specifications

You can save or retrieve your options for a data compare. This is done with File > Save Compare Options and File > Open Compare Options.

Other notes

Advanced Query Tool
© 2023 Cardett Associates Ltd. All rights reserved.