CREATE COLUMN TABLE "SBODEMOPT"."ABOE" ("BoeKey" INTEGER CS_INT NOT NULL , "BoeNum" INTEGER CS_INT NOT NULL , "BoeStatus" NVARCHAR(1), "BoeType" NVARCHAR(1) DEFAULT 'I' NOT NULL , "DpsBankCod" NVARCHAR(30), "DpsCntrCod" NVARCHAR(3), "DueDate" LONGDATE CS_LONGDATE, "DpstAcct" NVARCHAR(50), "DpstBranch" NVARCHAR(50), "Details" NVARCHAR(50), "TransRef" NVARCHAR(8), "PmntDate" LONGDATE CS_LONGDATE, "PmntNum" INTEGER CS_INT, "BoeSum" DECIMAL(21,6) CS_FIXED, "BoeSumSC" DECIMAL(21,6) CS_FIXED, "BoeSumFC" DECIMAL(21,6) CS_FIXED, "CardCode" NVARCHAR(15), "CardName" NVARCHAR(100), "BoeAcct" NVARCHAR(15), "Currency" NVARCHAR(3), "Printed" NVARCHAR(1) DEFAULT 'N', "TotalWords" NVARCHAR(100), "Signature" NVARCHAR(155), "TransNum" INTEGER CS_INT DEFAULT 0, "LinesSum" DECIMAL(21,6) CS_FIXED, "DdctPrcnt" DECIMAL(21,6) CS_FIXED, "Address" NVARCHAR(254), "UpdateDate" LONGDATE CS_LONGDATE, "CreateDate" LONGDATE CS_LONGDATE, "VatTotal" DECIMAL(21,6) CS_FIXED, "VatTotalSC" DECIMAL(21,6) CS_FIXED, "VatTotalFC" DECIMAL(21,6) CS_FIXED, "VatCalcult" NVARCHAR(1) DEFAULT 'N', "TaxDate" LONGDATE CS_LONGDATE, "DataSource" NVARCHAR(1) DEFAULT 'N', "SumRfndCln" DECIMAL(21,6) CS_FIXED, "UserSign" SMALLINT CS_INT, "PrintedBy" SMALLINT CS_INT, "Transfered" NVARCHAR(1) DEFAULT 'N', "Instance" SMALLINT CS_INT DEFAULT 0, "LogInstanc" INTEGER CS_INT DEFAULT 0 NOT NULL , "BPBankCod" NVARCHAR(30), "BPBankNam" NVARCHAR(250), "BPBankAct" NVARCHAR(50), "BPBankBrnc" NVARCHAR(50), "BPBankCtr" NVARCHAR(3), "RefNum" NVARCHAR(254), "IsReconcld" NVARCHAR(1) DEFAULT 'N', "Comments" NVARCHAR(254), "PayMethCod" NVARCHAR(15), "DepositNum" INTEGER CS_INT, "PymMethNam" NVARCHAR(100), "DeductSum" DECIMAL(21,6) CS_FIXED, "ControlKey" NVARCHAR(2), "AgentCode" NVARCHAR(32), "ReconcilNu" INTEGER CS_INT, "DepositTyp" NVARCHAR(1), "CreatStatu" NVARCHAR(1), "Ref2" NVARCHAR(254), "PayEngSt1" NVARCHAR(1), "PayEngSt2" NVARCHAR(1), "PayEngSt3" NVARCHAR(3), "StampTax" NVARCHAR(8), "StmpTxAmnt" DECIMAL(21,6) CS_FIXED, "DpsActKey" INTEGER CS_INT, "OutBnkKey" INTEGER CS_INT, "Portfolio" NVARCHAR(8), "VndCodeCEE" NVARCHAR(15), "VndNameCEE" NVARCHAR(100), "OurNum" INTEGER CS_INT, "BarcodeNum" NVARCHAR(120), "BarcodeRep" NVARCHAR(100), "OurNumChk" NVARCHAR(1), "FolioPref" NVARCHAR(4), "FolioNum" INTEGER CS_INT, "LPgFolioN" INTEGER CS_INT, "UserSign2" SMALLINT CS_INT, "IntrstAmnt" DECIMAL(21,6) CS_FIXED, "DiscAmnt" DECIMAL(21,6) CS_FIXED, "FineAmnt" DECIMAL(21,6) CS_FIXED, "IntrstDate" LONGDATE CS_LONGDATE, "DiscDate" LONGDATE CS_LONGDATE, "FineDate" LONGDATE CS_LONGDATE, "PostType" NVARCHAR(1), "IOFAmnt" DECIMAL(21,6) CS_FIXED, "ServFeeAm" DECIMAL(21,6) CS_FIXED, "OtherExAm" DECIMAL(21,6) CS_FIXED, "OtherInAm" DECIMAL(21,6) CS_FIXED, "BPLId" INTEGER CS_INT, "EnBPBnkAct" NCLOB MEMORY THRESHOLD 1000, "EncryptIV" NVARCHAR(100), "DPPStatus" NVARCHAR(1) DEFAULT 'N', PRIMARY KEY ("BoeKey", "LogInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE INDEX "ABOE_VPM_NUM" ON "SBODEMOPT"."ABOE" ( "PmntNum" ASC );
CREATE INDEX "ABOE_TRANS_NUM" ON "SBODEMOPT"."ABOE" ( "TransNum" ASC );
CREATE INDEX "ABOE_DPS_NUM" ON "SBODEMOPT"."ABOE" ( "DepositNum" ASC );
CREATE UNIQUE INDEX "ABOE_BOE_NUM" ON "SBODEMOPT"."ABOE" ( "BoeNum" ASC, "BoeType" ASC, "LogInstanc" ASC )