Create Table Custodian_RealizedGains(
								  CRG_Sequence integer Identity(1,1) NOT NULL,
								  CRG_RepId varchar(20) NOT Null,
								  CRG_AsOfDate datetime NOT NULL,
								  CRG_CustodianId VarChar(10) NOT NULL,
								  CRG_CustodAcctNum VarChar(30) NOT NULL,
								  CRG_Symbol VarChar(30) NOT NULL,
								  CRG_CloseDate datetime NOT NULL,
								  CRG_CloseQuantity float,
								  CRG_Proceeds money,
								  CRG_AcquisDate datetime,
								  CRG_PurchDate datetime,
								  CRG_OrigPrice float,
								  CRG_PurchPrice float,
								  CRG_UnAmortCost money,
								  CRG_AmortCost money,
								  CRG_UnAmortGain money,
								  CRG_AmortGain money,
								  CRG_DaysHeld integer,
								  CRG_HoldTerm VarChar(3),
								  CRG_CBtype VarChar(1),
								  CRG_CBFullyKnown VarChar(1),
								  CRG_ProcsFullyKnwn VarChar(1),
								  CRG_RGfullyKnown VarChar(1),
								  CRG_RGtaxable VarChar(1),
								  CRG_RGcertified VarChar(3),
								  CRG_OrigFaceVal money,
								  CRG_LotCostMethod VarChar(10),
								  CRG_EquivCTLot VarChar(6),
								  CRG_Washed VarChar(3),
								  CRG_WashUnAmortCost money,
								  CRG_WashAmortCost money,
								  CRG_CustodTAC VarChar(20),
								  CRG_LongShort VarChar(1),
								  CRG_SecType VarChar(8),
								  CRG_ProdCode VarChar(8),
								  CRG_CategCode VarChar(8),
								  CRG_TaxCode VarChar(8),
								  CRG_PfAcctNumber VarChar(20),
								  CRG_PfCloseDate datetime,
								  CRG_PfCloseTAC VarChar(5),
								  CRG_PFLot VarChar(4),
								  CRG_PFQuantity float,
								  CRG_PFProceeds money,
								  CRG_PFOpenDate datetime,
								  CRG_PFUnAmortCost money,
								  CRG_PFAmortCost money,
								  CRG_PFGain money,
								  CRG_PFWashCost money,
								  CRG_TempRecord bit null default 0,
								  CRG_ProgCtrlBits integer null default 0,
								  CRG_IsFrozen bit null default 0,
                                  CONSTRAINT PK_Custodian_RealizedGains PRIMARY KEY CLUSTERED (CRG_Sequence)
                      );
