use staging_namecheck;
go

SET ANSI_NULLS ON
SET ANSI_PADDING ON;
SET QUOTED_IDENTIFIER ON
go

declare @s varchar(4000) = '';

IF OBJECT_ID('[dbo].[TXM_Batch_profiling_raw_N]', 'U') IS NULL
begin
	CREATE TABLE [dbo].[TXM_Batch_profiling_raw_N](
		UserBank_id varchar(50) NOT NULL,
		Order_id varchar(50) NULL,
		Order_nr varchar(50) NULL,
		Transaction_id varchar(50) NOT NULL,
		Transaction_nr varchar(50) NULL,
		Account_id varchar(50) NOT NULL,
		Account_nr varchar(50) NULL,
		CustomerGroup_id varchar(50) NOT NULL,
		CustomerGroup_nr varchar(50) NULL,
		Branch_id varchar(50) NULL,
		External_flag int NULL,
		TransactionGroup_cd varchar(10) NULL,
		TransactionType_cd varchar(10) NULL,
		TransactionCategory_cd varchar(10) NULL,
		TransactionMode_cd varchar(10) NULL,
		InflowOutflow varchar(1) NULL,
		TransactionDescription varchar(4000) NULL,
		TransactionDate varchar(35) NOT NULL,--datetime
		TransactionValueDate varchar(35) NULL,--datetime
		AmountAccountCurrency numeric(15,2) NULL,
		AmountTransactionCurrency numeric(15,2) NULL,
		AmountLocalCurrency numeric(15,2) NULL,
		TransactionCurrency_cd varchar(10) NULL,
		TransactionCountry_cd varchar(10) NULL,
		TransactionLocation varchar(255) NULL,
		FundsType_cd varchar(10) NULL,
		PaymentSystemType_cd varchar(10) NULL,
		CounterpartyBankName varchar(255) NULL,
		CounterpartyBankSWIFT varchar(11) NULL,
		CounterpartyBankAddress varchar(255) NULL,
		CounterpartyBankID varchar(50) NULL,
		CounterpartyBankIDType_cd varchar(10) NULL,
		CounterpartyID varchar(50) NULL,
		CounterpartyType_cd varchar(10) NULL,
		CorrespondentBankName varchar(255) NULL,
		CorrespondentBankAddress varchar(255) NULL,
		CorrespondentBankSWIFT varchar(11) NULL,
		CounterpartyIBAN varchar(34) NULL,
		CounterpartyExtID varchar(50) NULL,
		CounterpartyAccountNumber varchar(50) NULL,
		CounterpartyName varchar(255) NULL,
		CounterpartyAddress varchar(255) NULL,
		CounterpartyDetailsText varchar(4000) NULL,
		CounterpartyBankCountry_cd varchar(10) NULL,
		CounterpartyCountry_cd varchar(10) NULL,
		CounterpartyMessage varchar(4000) NULL,
		CounterpartyAccount_id varchar(50) NULL,
		CounterpartyCustomerGroup_id varchar(50) NULL,
		CounterpartyFundsType_cd varchar(10) NULL,
		TransactionConductor_id varchar(50) NULL,
		TransactionAuthorizedBy varchar(50) NULL,
		TransactionPostingDate varchar(35) NULL,--datetime
		TransactionExchangeRate numeric(12,6) NULL,
		CounterpartyExchangeRate numeric(12,6) NULL,
		IntendendRecipient varchar(255) NULL,
		TransactionComment varchar(4000) NULL,
		 
		AccountIBAN varchar(34) NULL,
		AccountLocation varchar(255) NULL,
		AccountCurrency_cd varchar(10) NULL,
		AccountOpenDate varchar(35) NULL,--datetime
		AccountCloseDate varchar(35) NULL,--datetime
		AccountStatus_cd varchar(10) NULL,
		AccountType_cd varchar(10) NULL,
		AccountDescription varchar(4000) NULL,
		AccountPayAmountNonEU_cd varchar(10) NULL,
		AccountPayDestNonEU varchar(255) NULL,
		AccountSavingPeriod_cd varchar(10) NULL,
		AccountSavingMonthAmount_cd varchar(10) NULL,
		AccountAmountInitial_cd varchar(10) NULL,
		AccountSourceOfFunds_cd varchar(10) NULL,
		AccountAmountPerMonth_cd varchar(10) NULL,
		AccountRefAccountHolder varchar(255) NULL,
		AccountRefIBAN varchar(34) NULL,
		AccountComment varchar(4000) NULL,
		 
		SaldoLocal numeric(15,2) NULL,
		SaldoAccount numeric(15,2) NULL,
		SaldoDate varchar(35) NULL,--datetime
		 
		Customer_id varchar(50) NOT NULL,
		Customer_nr varchar(50) NULL,
		CustomerBranch_id varchar(50) NULL,
		CustomerType_cd varchar(10) NULL,
		CustomerFirstName varchar(100) NULL,
		CustomerLastName varchar(100) NULL,
		CustomerFullName varchar(255) NULL,
		CustomerOpeningDate varchar(35) NULL,--datetime
		CustomerStatus_cd varchar(10) NULL,
		CustomerDateOfBirth varchar(35) NULL,--datetime
		CustomerPlaceOfBirth varchar(255) NULL,
		CustomerCountryOfBirth_cd varchar(10) NULL,
		CustomerDateOfDeath varchar(35) NULL,--datetime
		CustomerCitizenship1_cd varchar(10) NULL,
		CustomerCitizenship2_cd varchar(10) NULL,
		CustomerGender_cd varchar(10) NULL,
		CustomerTitle_cd varchar(10) NULL,
		CustomerOccupation_cd varchar(10) NULL,
		CustomerTaxCountry_cd varchar(10) NULL,
		CustomerDomicile_flag int NULL,
		CustomerIncorporationNumber varchar(50) NULL,
		CustomerBuisinesCategory_cd varchar(10) NULL,
		CustomerLegalForm_cd varchar(10) NULL,
		CustomerParentCompanyResid_cd varchar(10) NULL,
		CustomerLegalCategory_cd varchar(10) NULL,
		CustomerFATCAStatus_cd varchar(10) NULL,
		CustomerBusinessRelation_cd varchar(10) NULL,
		CustomerIDCheckType_cd varchar(10) NULL,
		CustomerReferredEAM_cd varchar(10) NULL,
		CustomerComplexStructure_flag int NULL,
		CustomerGroupType_cd varchar(10) NULL,
		CustomerSizeCategory_cd varchar(10) NULL,
		CustomerLastChangeDate varchar(35) NULL,--datetime
		CustomerCivilStatus_cd varchar(10) NULL,
		CustomerRiskCategory_cd varchar(10) NULL,
		CustomerSegment_cd varchar(10) NULL,
		CustomerVip_flag int NULL,
		CustomerCategory_cd varchar(10) NULL,
		CustomerCapital numeric(15,2) NULL,
		Bank_flag int NULL,
		CustomerCommercialName varchar(255) NULL,
		CustomerEmail varchar(255) NULL,
		CustomerUrl varchar(255) NULL,
		CustomerTaxNumber varchar(100) NULL,
		CustomerTaxRegNumber varchar(100) NULL,
		CustomerMiddleName varchar(100) NULL,
		CustomerPrefixName varchar(100) NULL,
		CustomerMotherName varchar(255) NULL,
		CustomerAlias varchar(100) NULL,
		CustomerSSN varchar(25) NULL,
		CustomerPassportNumber varchar(255) NULL,
		CustomerPassportCountry_cd varchar(10) NULL,
		CustomerIDNumber varchar(255) NULL,
		CustomerCitizenship3_cd varchar(10) NULL,
		CustomerResidence_cd varchar(10) NULL,
		CustomerSourceOfWealth varchar(255) NULL,
		CustomerSalary_flag int NULL,
		CustomerEducationLevel_cd varchar(10) NULL,
		CustomerNetIncome numeric(15,2) NULL,
		CustomerAddIncome numeric(15,2) NULL,
		CustomerPhoneNumber varchar(100) NULL,
		SAR_flag int NULL,
		CustomerPepStatus_cd varchar(10) NULL,
		PEP_Description varchar(4000) NULL,
		PEP_Country_cd varchar(10) NULL,
		CustomerPEPCategory_cd varchar(10) NULL,
		CustomerSanctionStatus_flag int NULL,
		CustomerCrimeStatus_flag int NULL,
		CustomerInternStatus_flag int NULL,
		CustomerPepStatusOnboard_flag int NULL,
		CustomerComment varchar(4000) NULL,
		 
		AddressStreet varchar(255) NULL,
		AddressTown varchar(255) NULL,
		AddressCity varchar(255) NULL,
		AddressRegion varchar(255) NULL,
		AddressPostCode varchar(20) NULL,
		AddressCountry_cd varchar(10) NULL,
		AddressType_cd varchar(10) NULL,
		AddressOpenDate varchar(35) NULL,--datetime
		AddressExpiryDate varchar(35) NULL,--datetime
		AddressComment varchar(4000) NULL,
		 
		DEBIT numeric(1,0) NULL,
		CREDIT numeric(1,0) NULL,
		INFLOW numeric(1,0) NULL,
		OUTFLOW numeric(1,0) NULL,
		INFLOW_EXT_BANK numeric(1,0) NULL,
		OUTFLOW_EXT_BANK numeric(1,0) NULL,
		COUNTERPARTY_IBAN_01 numeric(1,0) NULL,
		KD_TOTAL_SALDO numeric(15,2) NULL,
		KT_DURATION int NULL,
		KT_Duration_Closed int NULL,
		KD_AGE int NULL,
		KD_DURATION numeric(9,2) NULL,
		KD_LAST_CHANGE int NULL,
		PEP_RELATED_01 numeric(1,0) NULL,
		LinkType_list varchar(4000) NULL,
		CustomerB_id_list varchar(4000) NULL,
		EmploymentType_list varchar(4000) NULL,
		FundType_list varchar(4000) NULL,
		FOREIGN_flag numeric(1, 0) NULL,
		SMALL_flag numeric(1, 0) NULL,
		ReturnDebit_flag numeric(1, 0) NULL,
		DubiousReason_flag numeric(1, 0) NULL,
		CryptoRelated_flag numeric(1, 0) NULL,
		Cash_flag numeric(1, 0) NULL,
		SavingsAccount_flag numeric(1, 0) NULL,
		ChequeDeposit_flag numeric(1, 0) NULL,
		T_DATE int NULL,
		T_Time int NULL,
		W_AMOUNTCHF numeric(15,2) NULL,
		KD_BHVCLUSTER int NULL,
		KD_BHV_THRESHOLD numeric(15,2) NULL,
		KD_BHV_RISK numeric(10,8) NULL,
		MAX_DAY_SUM_AMOUNT_1Y numeric(15,2) NULL,
		MAX_CNT_MONTH_TRANS_1Y int NULL,
		CNT_MONTH_WITH_TRANS_1Y int NULL,
		MAX_TRANSACTION_1Y numeric(15,2) NULL,
		MAX_MONTH_SUM_AMOUNT_1Y numeric(15,2) NULL,
		MAX_MONTH_SUM_INFLOW_1Y numeric(15,2) NULL,
		MAX_MONTH_SUM_OUTFLOW_1Y numeric(15,2) NULL,
		AVG_KD_SALDO_1Y numeric(15,2) NULL,
		MAX_KD_SALDO_1Y numeric(15,2) NULL,
		KD_SCORING_RISK numeric(5,2) NULL,
		KD_SCORING_RISKCLASS int NULL,
		KD_SCORING_RISK_SPILLOVER numeric(5,2) NULL,
		KD_SCORING_RISKCLASS_SPILLOVER int NULL,
		CNT_INFLOW_1h int NULL,
		CNT_INFLOW_3h int NULL,
		CNT_INFLOW_24h int NULL,
		CNT_INFLOW_1d int NULL,
		CNT_INFLOW_3d int NULL,
		CNT_INFLOW_7d int NULL,
		CNT_INFLOW_10d int NULL,
		CNT_INFLOW_30d int NULL,
		CNT_INFLOW_3m int NULL,
		CNT_INFLOW_6m int NULL,
		CNT_INFLOW_12m int NULL,
		CNT_INFLOW_24m int NULL,
		CNT_OUTFLOW_1h int NULL,
		CNT_OUTFLOW_3h int NULL,
		CNT_OUTFLOW_24h int NULL,
		CNT_OUTFLOW_1d int NULL,
		CNT_OUTFLOW_3d int NULL,
		CNT_OUTFLOW_7d int NULL,
		CNT_OUTFLOW_10d int NULL,
		CNT_OUTFLOW_30d int NULL,
		CNT_OUTFLOW_3m int NULL,
		CNT_OUTFLOW_6m int NULL,
		CNT_OUTFLOW_12m int NULL,
		CNT_OUTFLOW_24m int NULL,
		SUM_INFLOW_1h numeric(15,2) NULL,
		SUM_INFLOW_3h numeric(15,2) NULL,
		SUM_INFLOW_24h numeric(15,2) NULL,
		SUM_INFLOW_1d numeric(15,2) NULL,
		SUM_INFLOW_3d numeric(15,2) NULL,
		SUM_INFLOW_7d numeric(15,2) NULL,
		SUM_INFLOW_10d numeric(15,2) NULL,
		SUM_INFLOW_30d numeric(15,2) NULL,
		SUM_INFLOW_3m numeric(15,2) NULL,
		SUM_INFLOW_6m numeric(15,2) NULL,
		SUM_INFLOW_12m numeric(15,2) NULL,
		SUM_INFLOW_24m numeric(15,2) NULL,
		SUM_OUTFLOW_1h numeric(15,2) NULL,
		SUM_OUTFLOW_3h numeric(15,2) NULL,
		SUM_OUTFLOW_24h numeric(15,2) NULL,
		SUM_OUTFLOW_1d numeric(15,2) NULL,
		SUM_OUTFLOW_3d numeric(15,2) NULL,
		SUM_OUTFLOW_7d numeric(15,2) NULL,
		SUM_OUTFLOW_10d numeric(15,2) NULL,
		SUM_OUTFLOW_30d numeric(15,2) NULL,
		SUM_OUTFLOW_3m numeric(15,2) NULL,
		SUM_OUTFLOW_6m numeric(15,2) NULL,
		SUM_OUTFLOW_12m numeric(15,2) NULL,
		SUM_OUTFLOW_24m numeric(15,2) NULL,
		AVG_INFLOW_1h numeric(15,2) NULL,
		AVG_INFLOW_3h numeric(15,2) NULL,
		AVG_INFLOW_24h numeric(15,2) NULL,
		AVG_INFLOW_1d numeric(15,2) NULL,
		AVG_INFLOW_3d numeric(15,2) NULL,
		AVG_INFLOW_7d numeric(15,2) NULL,
		AVG_INFLOW_10d numeric(15,2) NULL,
		AVG_INFLOW_30d numeric(15,2) NULL,
		AVG_INFLOW_3m numeric(15,2) NULL,
		AVG_INFLOW_6m numeric(15,2) NULL,
		AVG_INFLOW_12m numeric(15,2) NULL,
		AVG_INFLOW_24m numeric(15,2) NULL,
		AVG_OUTFLOW_1h numeric(15,2) NULL,
		AVG_OUTFLOW_3h numeric(15,2) NULL,
		AVG_OUTFLOW_24h numeric(15,2) NULL,
		AVG_OUTFLOW_1d numeric(15,2) NULL,
		AVG_OUTFLOW_3d numeric(15,2) NULL,
		AVG_OUTFLOW_7d numeric(15,2) NULL,
		AVG_OUTFLOW_10d numeric(15,2) NULL,
		AVG_OUTFLOW_30d numeric(15,2) NULL,
		AVG_OUTFLOW_3m numeric(15,2) NULL,
		AVG_OUTFLOW_6m numeric(15,2) NULL,
		AVG_OUTFLOW_12m numeric(15,2) NULL,
		AVG_OUTFLOW_24m numeric(15,2) NULL,
		CNT_CPIBAN_INFLOW_1h int NULL,
		CNT_CPIBAN_INFLOW_3h int NULL,
		CNT_CPIBAN_INFLOW_24h int NULL,
		CNT_CPIBAN_INFLOW_1d int NULL,
		CNT_CPIBAN_INFLOW_3d int NULL,
		CNT_CPIBAN_INFLOW_7d int NULL,
		CNT_CPIBAN_INFLOW_10d int NULL,
		CNT_CPIBAN_INFLOW_30d int NULL,
		CNT_CPIBAN_INFLOW_3m int NULL,
		CNT_CPIBAN_INFLOW_6m int NULL,
		CNT_CPIBAN_INFLOW_12m int NULL,
		CNT_CPIBAN_INFLOW_24m int NULL,
		CNT_CPIBAN_OUTFLOW_1h int NULL,
		CNT_CPIBAN_OUTFLOW_3h int NULL,
		CNT_CPIBAN_OUTFLOW_24h int NULL,
		CNT_CPIBAN_OUTFLOW_1d int NULL,
		CNT_CPIBAN_OUTFLOW_3d int NULL,
		CNT_CPIBAN_OUTFLOW_7d int NULL,
		CNT_CPIBAN_OUTFLOW_10d int NULL,
		CNT_CPIBAN_OUTFLOW_30d int NULL,
		CNT_CPIBAN_OUTFLOW_3m int NULL,
		CNT_CPIBAN_OUTFLOW_6m int NULL,
		CNT_CPIBAN_OUTFLOW_12m int NULL,
		CNT_CPIBAN_OUTFLOW_24m int NULL,
		SUM_CPIBAN_INFLOW_1h numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_3h numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_24h numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_1d numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_3d numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_7d numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_10d numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_30d numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_3m numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_6m numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_12m numeric(15,2) NULL,
		SUM_CPIBAN_INFLOW_24m numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_1h numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_3h numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_24h numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_1d numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_3d numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_7d numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_10d numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_30d numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_3m numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_6m numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_12m numeric(15,2) NULL,
		SUM_CPIBAN_OUTFLOW_24m numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_1h numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_3h numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_24h numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_1d numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_3d numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_7d numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_10d numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_30d numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_3m numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_6m numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_12m numeric(15,2) NULL,
		AVG_CPIBAN_INFLOW_24m numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_1h numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_3h numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_24h numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_1d numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_3d numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_7d numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_10d numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_30d numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_3m numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_6m numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_12m numeric(15,2) NULL,
		AVG_CPIBAN_OUTFLOW_24m numeric(15,2) NULL,
		CNT_CPCountry_INFLOW_1h int NULL,
		CNT_CPCountry_INFLOW_3h int NULL,
		CNT_CPCountry_INFLOW_24h int NULL,
		CNT_CPCountry_INFLOW_1d int NULL,
		CNT_CPCountry_INFLOW_3d int NULL,
		CNT_CPCountry_INFLOW_7d int NULL,
		CNT_CPCountry_INFLOW_10d int NULL,
		CNT_CPCountry_INFLOW_30d int NULL,
		CNT_CPCountry_INFLOW_3m int NULL,
		CNT_CPCountry_INFLOW_6m int NULL,
		CNT_CPCountry_INFLOW_12m int NULL,
		CNT_CPCountry_INFLOW_24m int NULL,
		CNT_CPCountry_OUTFLOW_1h int NULL,
		CNT_CPCountry_OUTFLOW_3h int NULL,
		CNT_CPCountry_OUTFLOW_24h int NULL,
		CNT_CPCountry_OUTFLOW_1d int NULL,
		CNT_CPCountry_OUTFLOW_3d int NULL,
		CNT_CPCountry_OUTFLOW_7d int NULL,
		CNT_CPCountry_OUTFLOW_10d int NULL,
		CNT_CPCountry_OUTFLOW_30d int NULL,
		CNT_CPCountry_OUTFLOW_3m int NULL,
		CNT_CPCountry_OUTFLOW_6m int NULL,
		CNT_CPCountry_OUTFLOW_12m int NULL,
		CNT_CPCountry_OUTFLOW_24m int NULL,
		SUM_CPCountry_INFLOW_1h numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_3h numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_24h numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_1d numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_3d numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_7d numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_10d numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_30d numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_3m numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_6m numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_12m numeric(15,2) NULL,
		SUM_CPCountry_INFLOW_24m numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_1h numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_3h numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_24h numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_1d numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_3d numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_7d numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_10d numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_30d numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_3m numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_6m numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_12m numeric(15,2) NULL,
		SUM_CPCountry_OUTFLOW_24m numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_1h numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_3h numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_24h numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_1d numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_3d numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_7d numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_10d numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_30d numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_3m numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_6m numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_12m numeric(15,2) NULL,
		AVG_CPCountry_INFLOW_24m numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_1h numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_3h numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_24h numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_1d numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_3d numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_7d numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_10d numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_30d numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_3m numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_6m numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_12m numeric(15,2) NULL,
		AVG_CPCountry_OUTFLOW_24m numeric(15,2) NULL,
		CNT_CPName_INFLOW_1h int NULL,
		CNT_CPName_INFLOW_3h int NULL,
		CNT_CPName_INFLOW_24h int NULL,
		CNT_CPName_INFLOW_1d int NULL,
		CNT_CPName_INFLOW_3d int NULL,
		CNT_CPName_INFLOW_7d int NULL,
		CNT_CPName_INFLOW_10d int NULL,
		CNT_CPName_INFLOW_30d int NULL,
		CNT_CPName_INFLOW_3m int NULL,
		CNT_CPName_INFLOW_6m int NULL,
		CNT_CPName_INFLOW_12m int NULL,
		CNT_CPName_INFLOW_24m int NULL,
		CNT_CPName_OUTFLOW_1h int NULL,
		CNT_CPName_OUTFLOW_3h int NULL,
		CNT_CPName_OUTFLOW_24h int NULL,
		CNT_CPName_OUTFLOW_1d int NULL,
		CNT_CPName_OUTFLOW_3d int NULL,
		CNT_CPName_OUTFLOW_7d int NULL,
		CNT_CPName_OUTFLOW_10d int NULL,
		CNT_CPName_OUTFLOW_30d int NULL,
		CNT_CPName_OUTFLOW_3m int NULL,
		CNT_CPName_OUTFLOW_6m int NULL,
		CNT_CPName_OUTFLOW_12m int NULL,
		CNT_CPName_OUTFLOW_24m int NULL,
		SUM_CPName_INFLOW_1h numeric(15,2) NULL,
		SUM_CPName_INFLOW_3h numeric(15,2) NULL,
		SUM_CPName_INFLOW_24h numeric(15,2) NULL,
		SUM_CPName_INFLOW_1d numeric(15,2) NULL,
		SUM_CPName_INFLOW_3d numeric(15,2) NULL,
		SUM_CPName_INFLOW_7d numeric(15,2) NULL,
		SUM_CPName_INFLOW_10d numeric(15,2) NULL,
		SUM_CPName_INFLOW_30d numeric(15,2) NULL,
		SUM_CPName_INFLOW_3m numeric(15,2) NULL,
		SUM_CPName_INFLOW_6m numeric(15,2) NULL,
		SUM_CPName_INFLOW_12m numeric(15,2) NULL,
		SUM_CPName_INFLOW_24m numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_1h numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_3h numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_24h numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_1d numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_3d numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_7d numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_10d numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_30d numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_3m numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_6m numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_12m numeric(15,2) NULL,
		SUM_CPName_OUTFLOW_24m numeric(15,2) NULL,
		AVG_CPName_INFLOW_1h numeric(15,2) NULL,
		AVG_CPName_INFLOW_3h numeric(15,2) NULL,
		AVG_CPName_INFLOW_24h numeric(15,2) NULL,
		AVG_CPName_INFLOW_1d numeric(15,2) NULL,
		AVG_CPName_INFLOW_3d numeric(15,2) NULL,
		AVG_CPName_INFLOW_7d numeric(15,2) NULL,
		AVG_CPName_INFLOW_10d numeric(15,2) NULL,
		AVG_CPName_INFLOW_30d numeric(15,2) NULL,
		AVG_CPName_INFLOW_3m numeric(15,2) NULL,
		AVG_CPName_INFLOW_6m numeric(15,2) NULL,
		AVG_CPName_INFLOW_12m numeric(15,2) NULL,
		AVG_CPName_INFLOW_24m numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_1h numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_3h numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_24h numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_1d numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_3d numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_7d numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_10d numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_30d numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_3m numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_6m numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_12m numeric(15,2) NULL,
		AVG_CPName_OUTFLOW_24m numeric(15,2) NULL,
		SUM_30d numeric(15,2) NULL,
		SUM_FOREIGN_INFLOW_3m numeric(15,2) NULL,
		SUM_FOREIGN_OUTFLOW_3m numeric(15,2) NULL,
		SUM_FOREIGN_INFLOW_12m numeric(15,2) NULL,
		SUM_FOREIGN_OUTFLOW_12m numeric(15,2) NULL,
		SUM_INOUT_1d numeric(15,2) NULL,
		SUM_INOUT_3d numeric(15,2) NULL,
		SUM_INOUT_7d numeric(15,2) NULL,
		SUM_INOUT_10d numeric(15,2) NULL,
		SUM_INOUT_30d numeric(15,2) NULL,
		SUM_INOUT_3m numeric(15,2) NULL,
		SUM_INOUT_6m numeric(15,2) NULL,
		SUM_INOUT_12m numeric(15,2) NULL,
		SUM_INOUT_24m numeric(15,2) NULL,
		CNT_INOUT_1d int NULL,
		CNT_INOUT_3d int NULL,
		CNT_INOUT_7d int NULL,
		CNT_INOUT_10d int NULL,
		CNT_INOUT_30d int NULL,
		CNT_INOUT_3m int NULL,
		CNT_INOUT_6m int NULL,
		CNT_INOUT_12m int NULL,
		CNT_INOUT_24m int NULL,
		SUM_FOREIGN_INOUT_3m numeric(15,2) NULL,
		SUM_FOREIGN_INOUT_12m numeric(15,2) NULL,
		CNT_SMALL_INFLOWS_30d int NULL,
		CNT_SMALL_OUTFLOWS_30d int NULL,
		SUM_RETURNDEBIT_30d numeric(15,2) NULL,
		CNT_RETURNDEBIT_30d int NULL,
		SUM_INFLOW_Dubious_3m numeric(15,2) NULL,
		CNT_INFLOW_Dubious_3m int NULL,
		SUM_INFLOW_CRYPTO_30d numeric(15,2) NULL,
		CNT_INFLOW_CRYPTO_30d int NULL,
		SUM_OUTFLOW_CRYPTO_30d numeric(15,2) NULL,
		CNT_OUTFLOW_CRYPTO_30d int NULL,
		SUM_OUTFLOW_CASH_30d numeric(15,2) NULL,
		CNT_OUTFLOW_CASH_30d int NULL,
		SUM_OUTFLOW_CASH_7d numeric(15,2) NULL,
		CNT_OUTFLOW_CASH_7d int NULL,
		SUM_OUTFLOW_CASH_3d numeric(15,2) NULL,
		CNT_OUTFLOW_CASH_3d int NULL,
		SUM_ChequeDeposit_3d numeric(15,2) NULL,
		MAX_SALDO_3d numeric(15,2) NULL,
		MAX_KD_TOTAL_SALDO_30d numeric(15,2) NULL,
		DAYS_FROM_LAST_TRANSACTION int NULL,
		CNT_TO_COUNTERPARTY_10d int NULL,
		SUM_TO_COUNTERPARTY_10d numeric(15,2) NULL,
		CNT_FROM_COUNTERPARTY_10d int NULL,
		SUM_FROM_COUNTERPARTY_10d numeric(15,2) NULL,
		CNT_TO_COUNTERPARTY_3m int NULL,
		SUM_TO_COUNTERPARTY_3m numeric(15,2) NULL,
		ProductCode_cd varchar(10) NULL,
		ProductCode varchar(4000) NULL,
		ProductDuration varchar(10) NULL,
		ProductChannel_cd varchar(10) NULL,
		ProductChannel varchar(4000) NULL,
		ActuarialReserve numeric(15,2) NULL,
		AccountBlockType_cd varchar(10) NULL,
		AccountBlockType varchar(4000) NULL,
		CountOwnerChange numeric(15,0) NULL,
		SUM_KD_CURRENT_SALDO numeric(15,2) NULL,
		SUM_KD_SAVINGS_SALDO numeric(15,2) NULL,
		SUM_KD_LOAN_SALDO numeric(15,2) NULL,
		SUM_KD_CREDITCARD_SALDO numeric(15,2) NULL,
		SUM_KD_BUILDINGSAVINGS_SALDO numeric(15,2) NULL,
		SUM_KD_CAPITAL_SALDO numeric(15,2) NULL,
		SUM_KD_LIFEINSURANCE_SALDO numeric(15,2) NULL,
		SUM_KD_NONLIFEINSURANCE_SALDO numeric(15,2) NULL,
		CNT_KD_CURRENT_SALDO int NULL,
		CNT_KD_SAVINGS_SALDO int NULL,
		CNT_KD_LOAN_SALDO int NULL,
		CNT_KD_CREDITCARD_SALDO int NULL,
		CNT_KD_BUILDINGSAVINGS_SALDO int NULL,
		CNT_KD_CAPITAL_SALDO int NULL,
		CNT_KD_LIFEINSURANCE_SALDO int NULL,
		CNT_KD_NONLIFEINSURANCE_SALDO int NULL,
		SUM_INFLOW_3RD_PARTY_14d numeric(15,2) NULL,
		CNT_INFLOW_3RD_PARTY_14d int NULL,
		SUM_INFLOW_LOAN_30d numeric(15,2) NULL,
		CNT_INFLOW_LOAN_30d int NULL,
		SUM_GAMBLING_7d numeric(15,2) NULL,
		SUM_GAMBLING_30d numeric(15,2) NULL,
		SUM_GAMBLING_3m numeric(15,2) NULL,
		CNT_GAMBLING_7d int NULL,
		CNT_GAMBLING_30d int NULL,
		CNT_GAMBLING_3m int NULL,
		TrCountryDELVO_flag numeric(1,0) NULL,
		POS_Debit_flag numeric(1,0) NULL,
		POS_Credit_flag numeric(1,0) NULL,
		ATM_Debit_flag numeric(1,0) NULL,
		ATM_Credit_flag numeric(1,0) NULL,
		DifCounterparties_flag numeric(1,0) NULL,
		MismatchRecipient_flag numeric(1,0) NULL,
		SUM_RISK_POS_7d numeric(15,2) NULL,
		SUM_RISK_POS_30d numeric(15,2) NULL,
		SUM_RISK_POS_3m numeric(15,2) NULL,
		SUM_RISK_ATM_7d numeric(15,2) NULL,
		SUM_RISK_ATM_30d numeric(15,2) NULL,
		SUM_RISK_ATM_3m numeric(15,2) NULL,
		CNT_RISK_POS_7d int NULL,
		CNT_RISK_POS_30d int NULL,
		CNT_RISK_POS_3m int NULL,
		CNT_RISK_ATM_7d int NULL,
		CNT_RISK_ATM_30d int NULL,
		CNT_RISK_ATM_3m int NULL,
		AVG_RISK_POS_7d numeric(15,2) NULL,
		AVG_RISK_POS_30d numeric(15,2) NULL,
		AVG_RISK_POS_3m numeric(15,2) NULL,
		AVG_RISK_ATM_7d numeric(15,2) NULL,
		AVG_RISK_ATM_30d numeric(15,2) NULL,
		AVG_RISK_ATM_3m numeric(15,2) NULL,
		SUM_INFLOW_MISMATCH_RECIPIENT_3d numeric(15,2) NULL,
		CNT_INFLOW_MISMATCH_RECIPIENT_3d int NULL,
		SUM_INFLOW_MISMATCH_RECIPIENT_7d numeric(15,2) NULL,
		CNT_INFLOW_MISMATCH_RECIPIENT_7d int NULL,
		AgentContact_flag numeric(1,0) NULL,
		Non_Current_Account_flag numeric(1,0) NULL,
		Loan_flag numeric(1,0) NULL,
		Gambling_flag numeric(1,0) NULL,
		TW_DATL_1d int NULL,
		TW_DATL_3d int NULL,
		TW_DATL_7d int NULL,
		TW_DATL_10d int NULL,
		TW_DATL_30d int NULL,
		TW_DATL_3m int NULL,
		TW_DATL_6m int NULL,
		TW_DATL_12m int NULL,
		TW_DATL_24m int NULL,
		MSG varchar(7999) NULL,
		debug_dt_day varchar(255) NULL,
		HISTORY_LENGTH int NULL,
		TXM_CONFIG varchar(255) NULL,
		txm_chunk_id varchar(255) NULL,
		txm_chunk_id_internal varchar(255) NULL,
		txm_debug_NumRec varchar(255) NULL,
		txm_worker_comp_time float NULL,
		txm_worker_found_num float NULL,
		txm_worker_recno float NULL,
		txm_worker_tr_dt float NULL,
		score_5F03C6ED22324CE3AD84DEC601D19223 float NULL,
		sign_5F03C6ED22324CE3AD84DEC601D19223 int NULL,
		class_5F03C6ED22324CE3AD84DEC601D19223 float NULL,
		REC_ID bigint IDENTITY (1,1) NOT NULL
	) ON [PRIMARY];

	set @s = @s + 'TXM_Batch_profiling_raw_N has been created; ';
end;

--drop indexes that we do not use
if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NC1' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NC1 on [dbo].[TXM_Batch_profiling_raw_N];	
	set @s = @s + 'TXM_Batch_profiling_raw_NC1-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI2' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI2 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI2-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI3' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI3 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI3-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI4' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI4 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI4-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI5' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI5 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI5-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI6' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI6 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI6-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI7' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI7 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI7-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI9' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI9 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI9-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI10' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI10 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI10-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NC11' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NC11 on [dbo].[TXM_Batch_profiling_raw_N];	
	set @s = @s + 'TXM_Batch_profiling_raw_NC11-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI12' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	drop index TXM_Batch_profiling_raw_NI12 on [dbo].[TXM_Batch_profiling_raw_N];
	set @s = @s + 'TXM_Batch_profiling_raw_NI12-index has been dropped on TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='CASH' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column CASH;
	set @s = @s + 'CASH has been dropped in TXM_Batch_profiling_raw_N; ';
end;

--columns alterations
if (select is_nullable from sys.columns where [name]='SaldoDate' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]')) = 0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SaldoDate varchar(35) NULL;
	set @s = @s + 'SaldoDate allows NULLs; ';
end;

if exists (select * from sys.columns where [name]='msg_is_not_null' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column msg_is_not_null;
	set @s = @s + 'msg_is_not_null has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='AgentContact_days' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column AgentContact_days;
	set @s = @s + 'AgentContact_days has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='Transaction_id' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and system_type_id<>167)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column [Transaction_id] varchar(50) NOT NULL;
	set @s = @s + 'Transaction_id has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='Customer_id' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and system_type_id<>167)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N]
	alter column [Customer_id] varchar(50) NOT NULL;
	set @s = @s + 'Customer_id has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='Account_id' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and system_type_id<>167)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N]
	alter column [Account_id] varchar(50) NOT NULL;
	set @s = @s + 'Account_id has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='UserBank_id' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and system_type_id<>167)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N]
	alter column [UserBank_id] varchar(50) NOT NULL;
	set @s = @s + 'UserBank_id has been altered in TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='REC_ID' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
	and exists (select * from sys.columns where [name]='FAF_POC_REC_ID' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	EXEC sp_rename 'dbo.TXM_Batch_profiling_raw_N.FAF_POC_REC_ID', 'REC_ID', 'COLUMN';
	set @s = @s + 'FAF_POC_REC_ID has been renamed into REC_ID in TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='Cash_flag' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
	and exists (select * from sys.columns where [name]='ATM_flag' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	EXEC sp_rename 'dbo.TXM_Batch_profiling_raw_N.ATM_flag', 'Cash_flag', 'COLUMN';
	set @s = @s + 'ATM_flag has been renamed into Cash_flag in TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_CASH_30d' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
	and exists (select * from sys.columns where [name]='SUM_OUTFLOW_ATM_30d' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	EXEC sp_rename 'dbo.TXM_Batch_profiling_raw_N.SUM_OUTFLOW_ATM_30d', 'SUM_OUTFLOW_CASH_30d', 'COLUMN';
	set @s = @s + 'SUM_OUTFLOW_ATM_30d has been renamed into SUM_OUTFLOW_CASH_30d in TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_CASH_30d' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
	and exists (select * from sys.columns where [name]='CNT_OUTFLOW_ATM_30d' and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	EXEC sp_rename 'dbo.TXM_Batch_profiling_raw_N.CNT_OUTFLOW_ATM_30d', 'CNT_OUTFLOW_CASH_30d', 'COLUMN';
	set @s = @s + 'CNT_OUTFLOW_ATM_30d has been renamed into CNT_OUTFLOW_CASH_30d in TXM_Batch_profiling_raw_N; ';
end;



if not exists (select * from sys.columns where [name]='KT_Duration_Closed' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add KT_Duration_Closed int NULL;
	set @s = @s + 'KT_Duration_Closed has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='FOREIGN_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add FOREIGN_flag numeric(1, 0) NULL;
	set @s = @s + 'FOREIGN_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SMALL_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SMALL_flag numeric(1, 0) NULL;
	set @s = @s + 'SMALL_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_SMALL_INFLOWS_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_SMALL_INFLOWS_30d int NULL;
	set @s = @s + 'CNT_SMALL_INFLOWS_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_SMALL_OUTFLOWS_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_SMALL_OUTFLOWS_30d int NULL;
	set @s = @s + 'CNT_SMALL_OUTFLOWS_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='SUM_FOREIGN_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column SUM_FOREIGN_INFLOW_30d;
	set @s = @s + 'SUM_FOREIGN_INFLOW_30d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='SUM_FOREIGN_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column SUM_FOREIGN_OUTFLOW_30d;
	set @s = @s + 'SUM_FOREIGN_OUTFLOW_30d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='SUM_FOREIGN_INOUT_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column SUM_FOREIGN_INOUT_30d;
	set @s = @s + 'SUM_FOREIGN_INOUT_30d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='SUM_INFLOW_DIFSENDER_14d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column SUM_INFLOW_DIFSENDER_14d;
	set @s = @s + 'SUM_INFLOW_DIFSENDER_14d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='CNT_INFLOW_DIFSENDER_14d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column CNT_INFLOW_DIFSENDER_14d;
	set @s = @s + 'CNT_INFLOW_DIFSENDER_14d has been dropped in TXM_Batch_profiling_raw_N; ';
end;



if not exists (select * from sys.columns where [name]='SUM_FOREIGN_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_FOREIGN_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_FOREIGN_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_FOREIGN_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_FOREIGN_INOUT_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_FOREIGN_INOUT_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INOUT_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_FOREIGN_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_FOREIGN_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_FOREIGN_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_FOREIGN_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_FOREIGN_INOUT_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_FOREIGN_INOUT_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INOUT_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ReturnDebit_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ReturnDebit_flag numeric(1,0) NULL;
	set @s = @s + 'ReturnDebit_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='DubiousReason_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add DubiousReason_flag numeric(1,0) NULL;
	set @s = @s + 'DubiousReason_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CryptoRelated_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CryptoRelated_flag numeric(1,0) NULL;
	set @s = @s + 'CryptoRelated_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='Cash_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add Cash_flag numeric(1,0) NULL;
	set @s = @s + 'Cash_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SavingsAccount_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SavingsAccount_flag numeric(1,0) NULL;
	set @s = @s + 'SavingsAccount_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ChequeDeposit_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ChequeDeposit_flag numeric(1,0) NULL;
	set @s = @s + 'ChequeDeposit_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CheckDeposit_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CheckDeposit_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CheckDeposit_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_RETURNDEBIT_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_RETURNDEBIT_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_RETURNDEBIT_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_RETURNDEBIT_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_RETURNDEBIT_30d int NULL;
	set @s = @s + 'CNT_RETURNDEBIT_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_CRYPTO_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_CRYPTO_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_CRYPTO_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_CRYPTO_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_CRYPTO_30d int NULL;
	set @s = @s + 'CNT_INFLOW_CRYPTO_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_CRYPTO_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_CRYPTO_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_CRYPTO_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_CRYPTO_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_CRYPTO_30d int NULL;
	set @s = @s + 'CNT_OUTFLOW_CRYPTO_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_CASH_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_CASH_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_CASH_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_CASH_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_CASH_30d int NULL;
	set @s = @s + 'CNT_OUTFLOW_CASH_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_CASH_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_CASH_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_CASH_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_CASH_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_CASH_7d int NULL;
	set @s = @s + 'CNT_OUTFLOW_CASH_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_CASH_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_CASH_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_CASH_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_CASH_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_CASH_3d int NULL;
	set @s = @s + 'CNT_OUTFLOW_CASH_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='SUM_INFLOW_Dubious_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column SUM_INFLOW_Dubious_30d;
	set @s = @s + 'SUM_INFLOW_Dubious_30d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='CNT_INFLOW_Dubious_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column CNT_INFLOW_Dubious_30d;
	set @s = @s + 'CNT_INFLOW_Dubious_30d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_Dubious_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_Dubious_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_Dubious_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_Dubious_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_Dubious_3m int NULL;
	set @s = @s + 'CNT_INFLOW_Dubious_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='SUM_TO_COUNTERPARTY_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column SUM_TO_COUNTERPARTY_30d;
	set @s = @s + 'SUM_TO_COUNTERPARTY_30d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if exists (select * from sys.columns where [name]='CNT_TO_COUNTERPARTY_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] drop column CNT_TO_COUNTERPARTY_30d;
	set @s = @s + 'CNT_TO_COUNTERPARTY_30d has been dropped in TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_TO_COUNTERPARTY_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_TO_COUNTERPARTY_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_TO_COUNTERPARTY_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_TO_COUNTERPARTY_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_TO_COUNTERPARTY_3m int NULL;
	set @s = @s + 'CNT_TO_COUNTERPARTY_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_ChequeDeposit_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_ChequeDeposit_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_ChequeDeposit_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_1d int NULL;
	set @s = @s + 'CNT_INOUT_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_3d int NULL;
	set @s = @s + 'CNT_INOUT_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_10d int NULL;
	set @s = @s + 'CNT_INOUT_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_30d int NULL;
	set @s = @s + 'CNT_INOUT_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_3m int NULL;
	set @s = @s + 'CNT_INOUT_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_6m int NULL;
	set @s = @s + 'CNT_INOUT_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_12m int NULL;
	set @s = @s + 'CNT_INOUT_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='T_Time' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add T_Time int NULL;
	set @s = @s + 'T_Time has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_1h int NULL;
	set @s = @s + 'CNT_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_3h int NULL;
	set @s = @s + 'CNT_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_24h int NULL;
	set @s = @s + 'CNT_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_7d int NULL;
	set @s = @s + 'CNT_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_24m int NULL;
	set @s = @s + 'CNT_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_1h int NULL;
	set @s = @s + 'CNT_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_3h int NULL;
	set @s = @s + 'CNT_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_24h int NULL;
	set @s = @s + 'CNT_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_7d int NULL;
	set @s = @s + 'CNT_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_OUTFLOW_24m int NULL;
	set @s = @s + 'CNT_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_1h int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_3h int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_24h int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_1d int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_3d int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_7d int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_10d int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_30d int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_3m int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_6m int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_12m int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_INFLOW_24m int NULL;
	set @s = @s + 'CNT_CPIBAN_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_1h int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_3h int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_24h int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_1d int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_3d int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_7d int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_10d int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_30d int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_3m int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_6m int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_12m int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPIBAN_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPIBAN_OUTFLOW_24m int NULL;
	set @s = @s + 'CNT_CPIBAN_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPIBAN_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPIBAN_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_1h int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_3h int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_24h int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_1d int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_3d int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_7d int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_10d int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_30d int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_3m int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_6m int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_12m int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_INFLOW_24m int NULL;
	set @s = @s + 'CNT_CPCountry_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_1h int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_3h int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_24h int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_1d int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_3d int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_7d int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_10d int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_30d int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_3m int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_6m int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_12m int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPCountry_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPCountry_OUTFLOW_24m int NULL;
	set @s = @s + 'CNT_CPCountry_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPCountry_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPCountry_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPCountry_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPCountry_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_1h int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_3h int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_24h int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_1d int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_3d int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_7d int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_10d int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_30d int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_3m int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_6m int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_12m int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_INFLOW_24m int NULL;
	set @s = @s + 'CNT_CPName_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_1h int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_3h int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_24h int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_1d int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_3d int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_7d int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_10d int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_30d int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_3m int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_6m int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_12m int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_CPName_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_CPName_OUTFLOW_24m int NULL;
	set @s = @s + 'CNT_CPName_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_CPName_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_CPName_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_1h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_3h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_24h has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_1d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_10d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_CPName_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_CPName_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='TW_DATL_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add TW_DATL_7d int NULL;
	set @s = @s + 'TW_DATL_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='TW_DATL_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add TW_DATL_3m int NULL;
	set @s = @s + 'TW_DATL_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='TW_DATL_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add TW_DATL_6m int NULL;
	set @s = @s + 'TW_DATL_6m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='TW_DATL_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add TW_DATL_12m int NULL;
	set @s = @s + 'TW_DATL_12m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='TW_DATL_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add TW_DATL_24m int NULL;
	set @s = @s + 'TW_DATL_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='HISTORY_LENGTH' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add HISTORY_LENGTH int NULL;
	set @s = @s + 'HISTORY_LENGTH has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='MAX_SALDO_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add MAX_SALDO_3d numeric(15,2) NULL;
	set @s = @s + 'MAX_SALDO_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_7d int NULL;
	set @s = @s + 'CNT_INOUT_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INOUT_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INOUT_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INOUT_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INOUT_24m int NULL;
	set @s = @s + 'CNT_INOUT_24m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ProductCode_cd' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ProductCode_cd varchar(10) NULL;
	set @s = @s + 'ProductCode_cd has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ProductCode' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ProductCode varchar(4000) NULL;
	set @s = @s + 'ProductCode has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ProductDuration' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ProductDuration varchar(10) NULL;
	set @s = @s + 'ProductDuration has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ProductChannel_cd' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ProductChannel_cd varchar(10) NULL;
	set @s = @s + 'ProductChannel_cd has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ProductChannel' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ProductChannel varchar(4000) NULL;
	set @s = @s + 'ProductChannel has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ActuarialReserve' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ActuarialReserve numeric(15,2) NULL;
	set @s = @s + 'ActuarialReserve has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AccountBlockType_cd' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AccountBlockType_cd varchar(10) NULL;
	set @s = @s + 'AccountBlockType_cd has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AccountBlockType' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AccountBlockType varchar(4000) NULL;
	set @s = @s + 'AccountBlockType has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CountOwnerChange' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CountOwnerChange numeric(15,0) NULL;
	set @s = @s + 'CountOwnerChange has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_CURRENT_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_CURRENT_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_CURRENT_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_SAVINGS_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_SAVINGS_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_SAVINGS_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_LOAN_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_LOAN_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_LOAN_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_CREDITCARD_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_CREDITCARD_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_CREDITCARD_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_BUILDINGSAVINGS_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_BUILDINGSAVINGS_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_BUILDINGSAVINGS_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_CAPITAL_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_CAPITAL_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_CAPITAL_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_LIFEINSURANCE_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_LIFEINSURANCE_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_LIFEINSURANCE_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_KD_NONLIFEINSURANCE_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_KD_NONLIFEINSURANCE_SALDO numeric(15,2) NULL;
	set @s = @s + 'SUM_KD_NONLIFEINSURANCE_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_CURRENT_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_CURRENT_SALDO int NULL;
	set @s = @s + 'CNT_KD_CURRENT_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_SAVINGS_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_SAVINGS_SALDO int NULL;
	set @s = @s + 'CNT_KD_SAVINGS_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_LOAN_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_LOAN_SALDO int NULL;
	set @s = @s + 'CNT_KD_LOAN_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_CREDITCARD_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_CREDITCARD_SALDO int NULL;
	set @s = @s + 'CNT_KD_CREDITCARD_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_BUILDINGSAVINGS_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_BUILDINGSAVINGS_SALDO int NULL;
	set @s = @s + 'CNT_KD_BUILDINGSAVINGS_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_CAPITAL_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_CAPITAL_SALDO int NULL;
	set @s = @s + 'CNT_KD_CAPITAL_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_LIFEINSURANCE_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_LIFEINSURANCE_SALDO int NULL;
	set @s = @s + 'CNT_KD_LIFEINSURANCE_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_KD_NONLIFEINSURANCE_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_KD_NONLIFEINSURANCE_SALDO int NULL;
	set @s = @s + 'CNT_KD_NONLIFEINSURANCE_SALDO has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_3RD_PARTY_14d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_3RD_PARTY_14d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_3RD_PARTY_14d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_3RD_PARTY_14d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_3RD_PARTY_14d int NULL;
	set @s = @s + 'CNT_INFLOW_3RD_PARTY_14d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_LOAN_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_LOAN_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_LOAN_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_LOAN_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_LOAN_30d int NULL;
	set @s = @s + 'CNT_INFLOW_LOAN_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_GAMBLING_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_GAMBLING_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_GAMBLING_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_GAMBLING_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_GAMBLING_7d int NULL;
	set @s = @s + 'CNT_GAMBLING_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_GAMBLING_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_GAMBLING_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_GAMBLING_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_GAMBLING_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_GAMBLING_30d int NULL;
	set @s = @s + 'CNT_GAMBLING_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_GAMBLING_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_GAMBLING_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_GAMBLING_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_GAMBLING_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_GAMBLING_3m int NULL;
	set @s = @s + 'CNT_GAMBLING_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='TrCountryDELVO_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add TrCountryDELVO_flag numeric(1,0) NULL;
	set @s = @s + 'TrCountryDELVO_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='POS_Debit_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add POS_Debit_flag numeric(1,0) NULL;
	set @s = @s + 'POS_Debit_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='POS_Credit_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add POS_Credit_flag numeric(1,0) NULL;
	set @s = @s + 'POS_Credit_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ATM_Debit_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ATM_Debit_flag numeric(1,0) NULL;
	set @s = @s + 'ATM_Debit_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='ATM_Credit_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add ATM_Credit_flag numeric(1,0) NULL;
	set @s = @s + 'ATM_Credit_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='DifCounterparties_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add DifCounterparties_flag numeric(1,0) NULL;
	set @s = @s + 'DifCounterparties_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='MismatchRecipient_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add MismatchRecipient_flag numeric(1,0) NULL;
	set @s = @s + 'MismatchRecipient_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_RISK_POS_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_RISK_POS_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_RISK_POS_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_RISK_POS_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_RISK_POS_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_RISK_POS_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_RISK_POS_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_RISK_POS_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_RISK_POS_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_RISK_POS_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_RISK_POS_7d int NULL;
	set @s = @s + 'CNT_RISK_POS_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_RISK_POS_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_RISK_POS_30d int NULL;
	set @s = @s + 'CNT_RISK_POS_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_RISK_POS_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_RISK_POS_3m int NULL;
	set @s = @s + 'CNT_RISK_POS_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_RISK_POS_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_RISK_POS_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_RISK_POS_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_RISK_POS_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_RISK_POS_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_RISK_POS_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_RISK_POS_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_RISK_POS_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_RISK_POS_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_RISK_ATM_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_RISK_ATM_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_RISK_ATM_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_RISK_ATM_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_RISK_ATM_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_RISK_ATM_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_RISK_ATM_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_RISK_ATM_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_RISK_ATM_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_RISK_ATM_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_RISK_ATM_7d int NULL;
	set @s = @s + 'CNT_RISK_ATM_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_RISK_ATM_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_RISK_ATM_30d int NULL;
	set @s = @s + 'CNT_RISK_ATM_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_RISK_ATM_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_RISK_ATM_3m int NULL;
	set @s = @s + 'CNT_RISK_ATM_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_RISK_ATM_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_RISK_ATM_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_RISK_ATM_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_RISK_ATM_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_RISK_ATM_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_RISK_ATM_30d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AVG_RISK_ATM_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AVG_RISK_ATM_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_RISK_ATM_3m has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_MISMATCH_RECIPIENT_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_MISMATCH_RECIPIENT_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_MISMATCH_RECIPIENT_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_MISMATCH_RECIPIENT_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_MISMATCH_RECIPIENT_3d int NULL;
	set @s = @s + 'CNT_INFLOW_MISMATCH_RECIPIENT_3d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='SUM_INFLOW_MISMATCH_RECIPIENT_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add SUM_INFLOW_MISMATCH_RECIPIENT_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_MISMATCH_RECIPIENT_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='CNT_INFLOW_MISMATCH_RECIPIENT_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add CNT_INFLOW_MISMATCH_RECIPIENT_7d int NULL;
	set @s = @s + 'CNT_INFLOW_MISMATCH_RECIPIENT_7d has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='AgentContact_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add AgentContact_flag numeric(1,0) NULL;
	set @s = @s + 'AgentContact_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='Non_Current_Account_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add Non_Current_Account_flag numeric(1,0) NULL;
	set @s = @s + 'Non_Current_Account_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='Loan_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add Loan_flag numeric(1,0) NULL;
	set @s = @s + 'Loan_flag has been added into TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.columns where [name]='Gambling_flag' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] add Gambling_flag numeric(1,0) NULL;
	set @s = @s + 'Gambling_flag has been added into TXM_Batch_profiling_raw_N; ';
end;


if (select count(*) from sys.columns where [name]='KD_TOTAL_SALDO' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column KD_TOTAL_SALDO numeric(15,2) NULL;
	set @s = @s + 'KD_TOTAL_SALDO has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='W_AMOUNTCHF' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column W_AMOUNTCHF numeric(15,2) NULL;
	set @s = @s + 'W_AMOUNTCHF has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='KD_BHV_THRESHOLD' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column KD_BHV_THRESHOLD numeric(15,2) NULL;
	set @s = @s + 'KD_BHV_THRESHOLD has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='MAX_DAY_SUM_AMOUNT_1Y' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column MAX_DAY_SUM_AMOUNT_1Y numeric(15,2) NULL;
	set @s = @s + 'MAX_DAY_SUM_AMOUNT_1Y has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='MAX_TRANSACTION_1Y' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column MAX_TRANSACTION_1Y numeric(15,2) NULL;
	set @s = @s + 'MAX_TRANSACTION_1Y has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='MAX_MONTH_SUM_AMOUNT_1Y' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column MAX_MONTH_SUM_AMOUNT_1Y numeric(15,2) NULL;
	set @s = @s + 'MAX_MONTH_SUM_AMOUNT_1Y has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='MAX_MONTH_SUM_INFLOW_1Y' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column MAX_MONTH_SUM_INFLOW_1Y numeric(15,2) NULL;
	set @s = @s + 'MAX_MONTH_SUM_INFLOW_1Y has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='MAX_MONTH_SUM_OUTFLOW_1Y' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column MAX_MONTH_SUM_OUTFLOW_1Y numeric(15,2) NULL;
	set @s = @s + 'MAX_MONTH_SUM_OUTFLOW_1Y has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_KD_SALDO_1Y' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_KD_SALDO_1Y numeric(15,2) NULL;
	set @s = @s + 'AVG_KD_SALDO_1Y has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='MAX_KD_SALDO_1Y' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column MAX_KD_SALDO_1Y numeric(15,2) NULL;
	set @s = @s + 'MAX_KD_SALDO_1Y has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPIBAN_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPIBAN_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPIBAN_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPIBAN_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPIBAN_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPIBAN_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPCountry_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPCountry_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPCountry_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPCountry_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPCountry_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPCountry_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_CPName_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_CPName_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'SUM_CPName_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_INFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_INFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_INFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_1h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_1h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_1h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_3h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_3h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_3h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_24h' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_24h numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_24h has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_1d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_3d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_7d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_7d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_7d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_10d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_30d numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_6m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='AVG_CPName_OUTFLOW_24m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column AVG_CPName_OUTFLOW_24m numeric(15,2) NULL;
	set @s = @s + 'AVG_CPName_OUTFLOW_24m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_FOREIGN_INFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_FOREIGN_INFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_FOREIGN_OUTFLOW_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_FOREIGN_OUTFLOW_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_OUTFLOW_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_FOREIGN_INFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_FOREIGN_INFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_FOREIGN_OUTFLOW_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_FOREIGN_OUTFLOW_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_OUTFLOW_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INOUT_1d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INOUT_1d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_1d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INOUT_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INOUT_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INOUT_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INOUT_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INOUT_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INOUT_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INOUT_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INOUT_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INOUT_6m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INOUT_6m numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_6m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INOUT_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INOUT_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_INOUT_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_FOREIGN_INOUT_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_FOREIGN_INOUT_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INOUT_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_FOREIGN_INOUT_12m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_FOREIGN_INOUT_12m numeric(15,2) NULL;
	set @s = @s + 'SUM_FOREIGN_INOUT_12m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_RETURNDEBIT_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_RETURNDEBIT_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_RETURNDEBIT_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_Dubious_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_Dubious_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_Dubious_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_INFLOW_CRYPTO_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_INFLOW_CRYPTO_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_INFLOW_CRYPTO_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_CRYPTO_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_CRYPTO_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_CRYPTO_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_OUTFLOW_CASH_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_OUTFLOW_CASH_30d numeric(15,2) NULL;
	set @s = @s + 'SUM_OUTFLOW_CASH_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_ChequeDeposit_3d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_ChequeDeposit_3d numeric(15,2) NULL;
	set @s = @s + 'SUM_ChequeDeposit_3d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='MAX_KD_TOTAL_SALDO_30d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column MAX_KD_TOTAL_SALDO_30d numeric(15,2) NULL;
	set @s = @s + 'MAX_KD_TOTAL_SALDO_30d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_TO_COUNTERPARTY_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_TO_COUNTERPARTY_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_TO_COUNTERPARTY_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_FROM_COUNTERPARTY_10d' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_FROM_COUNTERPARTY_10d numeric(15,2) NULL;
	set @s = @s + 'SUM_FROM_COUNTERPARTY_10d has been altered in TXM_Batch_profiling_raw_N; ';
end;

if (select count(*) from sys.columns where [name]='SUM_TO_COUNTERPARTY_3m' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]') and [precision]>=20)>0
begin
	alter table [dbo].[TXM_Batch_profiling_raw_N] alter column SUM_TO_COUNTERPARTY_3m numeric(15,2) NULL;
	set @s = @s + 'SUM_TO_COUNTERPARTY_3m has been altered in TXM_Batch_profiling_raw_N; ';
end;




--create indexes
if not exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NC15' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	create unique clustered index TXM_Batch_profiling_raw_NC15 on [dbo].[TXM_Batch_profiling_raw_N] (Transaction_id,Account_id,rec_id desc);	
	set @s = @s + 'TXM_Batch_profiling_raw_NC15-index has been created on TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI14' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	create index TXM_Batch_profiling_raw_NI14 on [dbo].[TXM_Batch_profiling_raw_N] (txm_chunk_id);
	set @s = @s + 'TXM_Batch_profiling_raw_NI14-index has been created on TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI8' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	create index TXM_Batch_profiling_raw_NI8 on [dbo].[TXM_Batch_profiling_raw_N] (T_DATE);
	set @s = @s + 'TXM_Batch_profiling_raw_NI8-index has been created on TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI16' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	create index TXM_Batch_profiling_raw_NI16 on [dbo].[TXM_Batch_profiling_raw_N] (Customer_id,T_DATE desc);
	set @s = @s + 'TXM_Batch_profiling_raw_NI16-index has been created on TXM_Batch_profiling_raw_N; ';
end;

if not exists (select * from sys.indexes where [name]='TXM_Batch_profiling_raw_NI17' 
	and object_id = object_id('[dbo].[TXM_Batch_profiling_raw_N]'))
begin
	create index TXM_Batch_profiling_raw_NI17 on [dbo].[TXM_Batch_profiling_raw_N] (REC_ID);
	set @s = @s + 'TXM_Batch_profiling_raw_NI17-index has been created on TXM_Batch_profiling_raw_N; ';
end;

if len(@s) = 0
	set @s = 'TXM_Batch_profiling_raw_N is ok';
print @s;
go