Issue:
There may be a need to restore records from a backup of the AR_Customer_Bill 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_Customer_Bill ON
GO
INSERT INTO AR_Customer_Bill
(Customer_Bill_Id,Customer_Id,Commercial
,Honorific,First_Name,Last_Name,Middle_Initial,Business_Name,Address_1,Address_2
,Address_3,GE_Table1_Id,GE_Table2_Id,GE_Table3_Id,GE_Table4_Id,GE_Table5_Id
,Zip_Code_Plus4,Country_Id,Phone_1,Phone_2,Fax,E_Mail,GE1_Description,GE2_Description
,GE2_Short,GE3_Description,GE4_Description,GE5_Description,Is_Primary,Inactive,Branch_Id
,Email_Invoice,Business_Name_2,Email_Cycle_Invoice,Email_Job_Invoice,Email_Service_Invoice
,Email_Other_Invoice,Print_Cycle_Invoice,Print_Job_Invoice,Print_Service_Invoice,Print_Other_Invoice)
Select Customer_Bill_Id,Customer_Id,Commercial,Honorific,First_Name,Last_Name,Middle_Initial
,Business_Name,Address_1,Address_2,Address_3,GE_Table1_Id,GE_Table2_Id,GE_Table3_Id,GE_Table4_Id
,GE_Table5_Id,Zip_Code_Plus4,Country_Id,Phone_1,Phone_2,Fax,E_Mail,GE1_Description,GE2_Description,GE2_Short
,GE3_Description,GE4_Description,GE5_Description,Is_Primary,Inactive,Branch_Id,Email_Invoice,Business_Name_2
,Email_Cycle_Invoice,Email_Job_Invoice,Email_Service_Invoice,Email_Other_Invoice,Print_Cycle_Invoice
,Print_Job_Invoice,Print_Service_Invoice,Print_Other_Invoice
From ar_customer_bill_124643
GO
SET IDENTITY_INSERT AR_Customer_Bill Off