Use ATNDBTest
Go

BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.UserActionLog
	DROP CONSTRAINT FK_UserActionLog_SystemsOperation
GO
ALTER TABLE dbo.SystemsOperation SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.UserActionLog SET (LOCK_ESCALATION = TABLE)
GO
COMMIT

Update UserActionLog set SystemsOperationRef = '0310'   Where SystemsOperationRef = '0305'
Update UserActionLog set SystemsOperationRef = '031001' Where SystemsOperationRef = '030501'
Update UserActionLog set SystemsOperationRef = '031002' Where SystemsOperationRef = '030502'
Update UserActionLog set SystemsOperationRef = '031003' Where SystemsOperationRef = '030503'
Update UserActionLog set SystemsOperationRef = '0320'   Where SystemsOperationRef = '0306'
Update UserActionLog set SystemsOperationRef = '032001' Where SystemsOperationRef = '030601'
Update UserActionLog set SystemsOperationRef = '032002' Where SystemsOperationRef = '030602'
Update UserActionLog set SystemsOperationRef = '032003' Where SystemsOperationRef = '030603'
Update UserActionLog set SystemsOperationRef = '032004' Where SystemsOperationRef = '030604'
Update UserActionLog set SystemsOperationRef = '032010' Where SystemsOperationRef = '030605'
