Purpose
This script retrieves records from two tables where the key values match but the corresponding attributes are different, allowing for the identification of discrepancies between the source and target data.
Pattern
The pattern checks the data and writes the key with source value and target value where the value changed to the output.

Parameters
- SRCTBL: This table contains the source dataset.
- SRCKEY: This unique key identifies the object in question.
- SRCVAL: The value to be compared.
- TARTBL: This table contains the target dataset.
- TARKEY: This unique key identifies the object in question.
- TARVAL: The value to be compared.
Usage
In this case we have a table with 2023 clients and with 2024 clients. We apply the DEF pattern to get the client ids with postal codes that changed the postal code from 2023 to 2024.
Dataset
CLIENTS 2023

CLIENTS 2024

Parameter
- SRCTBL = [DQ-DEF.Clients23$]
- SRCKEY = CLIENT_ID
- SRCVAL = PLZ
- TARTBL = [DQ-DEF.Clients24$]
- TARKEY = CLIENT_ID
- TARVAL = PLZ
Statement

Output
