/*
   شنبه, 15 آبان 140002:19:22 ب.ظ
   User: 
   Server: TAHERIAN
   Database: ATNDB
   Application: 
*/

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
EXECUTE sp_rename N'dbo.FactorHeader.BaselessSettlement', N'BaselessSettlement_Old', 'COLUMN' 
GO
ALTER TABLE dbo.FactorHeader SET (LOCK_ESCALATION = TABLE)
GO
ALTER TABLE dbo.FactorHeader ADD BaselessSettlement bigint NULL
GO
Update dbo.FactorHeader Set BaselessSettlement = TotalPaid Where BaselessSettlement_Old = 1
Go
COMMIT
