📄 how to recalculate the contact reason using Database

how to recalculate the contact reason using Database

Purpose & Scope:
Delete from SpeechAnalytics_CallContactReason where ContactReasonID = 537
GO

Update SpeechAnalyticsContactReason
set HistoricalInteractionsChk = 1,
    HistoricalInteractionsChk_Update_Date = GETDATE(),
    HistoricalInteractionsDate = '2022-10-27 00:00:00.000'
where ID = 537
GO

Procedure:
Delete from SpeechAnalytics_CallContactReason where ContactReasonID = 537
GO

Update SpeechAnalyticsContactReason
set HistoricalInteractionsChk = 1,
    HistoricalInteractionsChk_Update_Date = GETDATE(),
    HistoricalInteractionsDate = '2022-10-27 00:00:00.000'
where ID = 537

GO