Script to Insert AR_Collection_Profile Records from Backup Table (Internal)

Issue:

There may be a need to restore records from a backup of the AR_Collection_Profile table when working on a data issue.

Resolution:

The records can be copied into the original table from the backup if needed. The script below can be used to restore the data to its original.

Using the backup table name from your original select statement, change the table name in the From clause to the correct one.

You can use the Where clause to copy over one or more records or to restore all the records it can be removed.

SET IDENTITY_INSERT AR_Collection_Profile ON

INSERT INTO AR_Collection_Profile

(Collection_Profile_Id,Description,Creation_Date,Minimum_Aging_Days

,Minimum_Aging_Balance,Customer_From,Customer_Thru,Commercial

,Residential,Notes,UserCode,Closed,Initial_Status_Id,Maximum_Aging_Days

,Last_Refresh,Put_In_Sequence,Restrict_Access,SequenceNumber

,Default_Template_Id)

SELECT Collection_Profile_Id,Description,Creation_Date,Minimum_Aging_Days

,Minimum_Aging_Balance,Customer_From,Customer_Thru,Commercial,Residential,Notes,UserCode,Closed,Initial_Status_Id

,Maximum_Aging_Days,Last_Refresh,Put_In_Sequence,Restrict_Access,SequenceNumber,Default_Template_Id

FROM AR_Collection_Profile_133339

GO

SET IDENTITY_INSERT AR_Collection_Profile Off

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted for approval.