Upgrading from CP 2012 SP2 to 2014 - SQL17.csp fails
Symptoms
Upgrading 2012 SP2 to 2014 - SQL17.csp fails. Received following error while upgrading CP database to 2014
Importing Changepoint SQL code failed.
Reason:
Cannot insert the value NULL into column 'Description', table 'Changepoint.dbo.CodeDetail'; column does not allow nulls. INSERT fails.
Exit Code:-1
Reason
During the CP2014 upgrade, BudgetCode1/2/3 and BudgetText1/2/3 are converted to configurable fields (UDFs), however the conversion does not handle orphan rows from BudgetCodes, which causes the error due to missing valid BillingofficeID.
The orphan rows can be identified with the query:
select bc.* from BudgetCodes bc where not exists (select top 1 1 from BillingOffice bo where bo.BillingOfficeId = bc.BillingOfficeId)
Resolution
Data patch 16.02.101.436 resolves the issue.