Create Table Portfolio_FundAccountingTransactions(
                                        PFT_Sequence integer Identity(1,1) NOT NULL,
                                        PFT_PortfolioId Varchar(20) NOT NULL, 
                                        PFT_Date datetime NOT NULL,  
                                        PFT_FAccountNum Varchar(20) NOT NULL,
				        PFT_FundClass VarChar(1) NULL,
                                        PFT_TAC Varchar(3) NOT NULL,
                                        PFT_Amount money Null,
                                        PFT_Commission money Null,
                                        PFT_Fee money Null,
                                        PFT_NAVprice float Null,
                                        PFT_Quantity float Null,
                                        PFT_EstTax money Null,
                                        PFT_TaxWithHeld money Null,
                                        PFT_IncomeDistribs money null,
                                        PFT_TaxLot smallint Null,
                                        PFT_AuxDate datetime Null,
                                        PFT_AuxAmount money Null,
                                        PFT_HoldPeriod smallint Null,
                                        PFT_CumAcctQuantity float Null,
                                        PFT_CumTotQuantity float Null,
                                        PFT_Description Varchar(160) Null,
		                        PFT_WashSaleId tinyint Null,
                                        PFT_Perturbed bit null default 0,
                                        PFT_NoQtyCalc bit null default 0,
                                        PFT_NoAmtCalc bit null default 0,
                                        PFT_NoFeeCalc bit null default 0,
                                        PFT_NoCommisCalc bit null default 0,
                                	PFT_MrgnFactor float null default 0,    
				        PFT_TaxWHinEstTax  bit null default 0,
                                        PFT_ProgCtrlBits integer null default 0,
                                        PFT_PercentofFund float null,
                                        PFT_TaxBits tinyint null default 0,
                                        PFT_TempRecord bit null default 0,
                                        PFT_IsFrozen bit null default 0,
                                        PFT_LinkToPTR integer null,
                                        CONSTRAINT PK_Portfolio_FundAccountingTransactions PRIMARY KEY CLUSTERED (PFT_Sequence)
                                      );

ALTER TABLE [dbo].[Portfolio_FundAccountingTransactions] ADD
	CONSTRAINT [FK_Portfolio_FundAccountingTransactions_Account_Details] FOREIGN KEY
	(
		[PFT_PortfolioId]
	) REFERENCES [dbo].[Account_Details] (
		[ADT_ClientAccountNumber]
	) ON DELETE CASCADE  ON UPDATE CASCADE

