Filtering the comparison with a WHERE clause
Published 26 July 2017
You can filter the rows that will be compared by applying a WHERE clause to the comparison. This is useful, for example, if you want to exclude a particular set of test data, or to speed up the comparison.
- You can only filter rows if the data source is a database. WHERE clauses are not available for scripts folders
- The WHERE Clause Editor doesn't validate WHERE clauses. The clauses are validated when the databases are compared.
To specify a WHERE clause for a table:
- On the Tables tab, double click the table you want to filter, or select it and click WHERE Clause.
The WHERE Clause Editor is displayed:
To apply the same WHERE clause to multiple tables, use SHIFT+Click or CTRL+Click. Type a valid WHERE clause. For example, if a table has columns ID, FirstName, and LastName, you may want to compare only rows where LastName is Smith. To do this, type the following in the box:
LastName='Smith'
If you want to apply a different WHERE clause for each data source, clear the Use the same WHERE clause for both data sources check box and type a WHERE clause in the box for the target database.
- Click OK. An icon ( ) is displayed next to any tables that will be filtered.