Previous page

Next page

Fixing key invalid errors

Invalid key errors use the error code KEYINVALID. Invalid key errors generally occur if incorrect data has been imported into PayGlobal.

This topic shows an example of an invalid key error and how to correct it.

Example

Audit log information:

Checking table 'Employee'...

Executing rule 'Keys valid'...

Found 1 invalid value(s) for key fields: AwardCode

All key fields must be upper case and not have leading or trailing spaces.

Error code: [KEYINVALID] - EmployeeID:1, AwardCode: C01 :- Extra spaces

Primary keys and foreign keys must be upper case and not have spaces before or after them.

In this example, the employee with EmployeeID 1 has an award code with spaces before or after it.

The audit log above was generated when the Integrity Checker was run with CorrectionAction = "LogOnly" for this rule.

To correct this problem, run the Integrity Checker again and use the automatic correction.

  1. On the Select the rules to use during integrity checking page, click the Keys valid rule.
  2. In the Options for rule section, select CorrectionAction = RemoveForeignKeyLeadingAndTrailingSpaces.

    The audit log now shows that the AwardCode was successfully corrected.

    Checking table 'Employee'...

    Executing rule 'Keys valid'...

    Found 1 invalid value(s) for key fields: AwardCode

    All key fields must be upper case and not have leading or trailing spaces.

    Error code: [KEYINVALID] - EmployeeID:1, AwardCode: C01 :- Extra spaces

    Correcting violations by removing leading and or trailing spaces on foreign key fields...

    Successfully updated 1 records for field AwardCode.

    EmployeeID:1

Previous page

Next page

Topic: 22437