Skip to main content

Error deleting working pattern: There are related records in "Employee.Career History"

Unable to delete a working pattern: There are related records in "Employee.Career History"

H
Written by Harry Ledger
Updated over a month ago

If you encounter this error while attempting to delete a working pattern, it indicates that the working pattern is currently linked to an existing career history record.

Instead of deleting a working pattern, we advise adding an expiry date.

You can run a data export to identify where the working pattern is being used by following the steps below.

  1. From the Admin Tool, click Import/export data.

  2. Click Create an export definition.

  3. Click Select the data to export.

  4. From the Database drop-down menu, select Select HR.

  5. Click the SQL tab then delete Select*.

  6. Copy the following SQL data into the blank space:

    Select Person.Snapshot.[Person Number], Person.Snapshot.[Effective Status], Person.Snapshot.[Formal Name], Person.Snapshot.[First Name], Person.Snapshot.Surname, Person.Snapshot.[E-Mail], Employee.[Career History].[Appointment Number], Employee.[Career History].[Effective Date], Employee.[Career History].[Career Number], Employee.[Career History].Workflow, Employee.[Career History].[Career Change Reason], Employee.[Career History].Status, Employee.[Career History].[Cost To Number], Employee.[Career History].[Post Number], Employee.[Career History].[Contract End Date], Employee.[Career History].[Location Number], Employee.[Career History].[Pattern Number], Employee.[Career History].[Hours Per Week], Employee.[Career History].[Weeks Per Year], Employee.[Career History].[Hours Per Year], Employee.[Career History].[Standard Hours], Employee.[Career History].FTE, Employee.[Career History].[Career Notes], Employee.[Career History].[Days Per Week], Employee.[Career History].[TTO Rule] From Person.Snapshot Inner Join Employee.[Career History] On Person.Snapshot.[Appointment Number] = Employee.[Career History].[Appointment Number]
  7. Type the working pattern name into the criteria for working pattern.

  8. Click Key Field at the top-left then select Person Number.

  9. Click OK then review the data.

  10. Once you're happy with the data, in the Definition field, enter a name for the export.

  11. Next to Export to file location, click Browse then choose where to save the export.

  12. From the File Format drop-down menu, select the relevant option.

  13. If required, select the Export column headers check box.

  14. Click Next then select the relevant options.

  15. Click Next then click Finish.

Did this answer your question?