Create Table Portfolio_FundAcctgLedger(
                                  PFL_Sequence integer Identity(1,1) NOT NULL,
                                  PFL_PortfolioId Varchar(20) NOT NULL,
								  PFL_Date datetime NOT NULL,
  								  PFL_IETac VarChar(8) NOT NULL,
  								  PFL_Category VarChar(20) not NULL,
								  PFL_SubCategory VarChar(20) null,
								  PFL_TaxFormCode VarChar(30) null,
								  PFL_Description VarChar(60)  null,
								  PFL_TransactionNote VarChar(60)  null,
								  PFL_CashAmount money null,
								  PFL_CashBalance money null,
								  PFL_AccrualChange money null,
								  PFL_AccrualBalance money null,
								  PFL_CapitalChange money null,
								  PFL_CapitalBalance money null,
								  PFL_InventoryChange money null,
								  PFL_InventoryBalance money null,
								  PFL_PaidInCapital money null,
								  PFL_PICBalance money null,
								  PFL_ProfLossDistrib money null,
								  PFL_AccumProfit money null,
								  PFL_NoSignCalc bit null,
								  PFL_ProgCtrlBits integer null,
								  PFL_TempRecord bit null  default 0,
 								  PFL_IsFrozen bit null  default 0,
                                  CONSTRAINT PK_Portfolio_FundAcctgLedger PRIMARY KEY
                                  NONCLUSTERED (PFL_Sequence)
                                  );

ALTER TABLE [dbo].[Portfolio_FundAcctgLedger] ADD
	CONSTRAINT [FK_Portfolio_FundAcctgLedger_Account_Details] FOREIGN KEY
	(
		[PFL_PortfolioId]
	) REFERENCES [dbo].[Account_Details] (
		[ADT_ClientAccountNumber]
	) ON DELETE CASCADE  ON UPDATE CASCADE
