meta data for this page

Creating a consistency query

Principle

A consistency query is used to find anomalies in the data. Technically, the same result could be obtained by constructing a simple inquiry, but it is often easier to express the criteria that records must meet than those that they must not meet.

The steps for creating a consistency query are identical to those for a inquiry, except for one difference: the choice of filters.

In the criteria entry interface, we find the classic tools (see dedicated page), with in addition a button: It allows you to copy a selected criterion from the If… area to the Then… area or vice versa.

Contrary to inquiry, there are 2 zones to enter criteria:

  • IF …
  • Then…

    it's mandatory to enter at least a criterion in If… and one in Then…

Example

  • Criterion If… ⇒ SHKCOO = '00001'.
  • Criterion Then ⇒ SHDCTO = 'SQ'

Case 1

  • Criterion If… set to Respected.
  • Criterion Then… set on Respected ⇒ We get the records for which SHKCOO = '00001' and SHDCTO <> 'SQ'.

Case 2

  • Criterion If… set to Respected.
  • Criterion Then… positioned on Not respected ⇒ We retrieve the records for which SHKCOO = '00001' and SHDCTO = 'SQ'.

Case 3

  • Criterion If … set to Not met.
  • Criterion So… positioned on Respected ⇒ We retrieve the records for which SHKCOO <> '00001' and SHDCTO <> 'SQ'…

Case 4

  • Criterion If … set to Not met.
  • Criterion Then… positioned on Not respected ⇒ We retrieve the records for which SHKCOO <> '00001' and SHDCTO = 'SQ' (in this case none)