Create Table  Account_FeeRate(
                        AFR_Sequence integer Identity(1,1) NOT NULL,
		        AFR_RepId varchar(20) NOT NULL,  
           		AFR_FeeClass varchar(20) NOT NULL,  
                        AFR_EffectiveDate datetime NOT NULL,
                        AFR_FeeMethod tinyint NOT null,
                        AFR_FeeLayering tinyint NOT null,
                        AFR_UseGroupValues tinyint NOT null,
			AFR_MinAmount money Not Null,
                        AFR_FeeRate real Not Null,
                        AFR_TaxRateOnFee float null,
                        AFR_IncentiveRate real Null,
                        AFR_IncentiveBase real Null,
                        AFR_MinFee money Null,
			AFR_ServiceCharge money Null,
		        AFR_DownMktThreshhold real Null,
  		        AFR_DownMktFeeRate real Null,
		        AFR_MinPercentage real Null,
                        AFR_UseSecFactors bit null default 0,
                        AFR_SumMinFees bit null default 0,
                        AFR_MonthEndValsOnly bit null default 0,
		        AFR_UseMinPercentLayering bit null default 0,
                        AFR_DaysPerYear smallint null,
                        AFR_BillingMonths tinyint null default 3,
                        AFR_HighwaterProfits bit null default 0,
                        AFR_NonTimeProratedIncentBase bit null default 0,
                        AFR_AssumeUniformPeriods bit null default 0,
                        AFR_MultiDateFeeDetail bit null default 0,
                        AFR_NonMergedFeeRates bit null default 0,
			AFR_TempRecord bit null default 0,
                        AFR_IsFrozen bit null default 0,
                        AFR_AssetType varchar(4) null,
                        AFR_BillGrossValue bit null,
                        AFR_IncentFeeMethod tinyint null,
                        --AFR_SecType VarChar(4) null,
                        AFR_SecGroup VarChar(8) null,
                        AFR_SecClass VarChar(8) null,
                        AFR_SecRegion  VarChar(7) null,
                        AFR_Currency  VarChar(4) null,
                        AFR_AccruedFees  boolean null,
                        AFR_NonProRatedEndValue bit  null,
                        AFR_BillDate DateTime  null,
			AFR_AdvisorName VarChar(40) null,
			AFR_AdvisorPctOfFee real null default 0,
                        CONSTRAINT PK_Account_FeeRate PRIMARY KEY CLUSTERED (AFR_Sequence)
                            );

ALTER TABLE [dbo].[Account_FeeRate] ADD
	CONSTRAINT [FK_Account_FeeRate_General_UserInfo] FOREIGN KEY
	(
		[AFR_RepId]
	) REFERENCES [dbo].[General_UserInfo] (
		[CUC_LoginName]
	) ON UPDATE CASCADE
