CREATE COLUMN TABLE "SBODEMOPT"."OBNK" ("IdNumber" INTEGER CS_INT, "AcctCode" NVARCHAR(15) NOT NULL , "Sequence" INTEGER CS_INT DEFAULT 0 NOT NULL , "AcctName" NVARCHAR(200), "Ref" NVARCHAR(35), "DueDate" LONGDATE CS_LONGDATE, "Memo" NVARCHAR(254), "DebAmount" DECIMAL(21,6) CS_FIXED, "DebAmntCur" NVARCHAR(3), "CredAmnt" DECIMAL(21,6) CS_FIXED, "CredAmntCu" NVARCHAR(3), "balance" DECIMAL(21,6) CS_FIXED, "BankMatch" INTEGER CS_INT, "DataSource" NVARCHAR(1) DEFAULT 'N', "UserSign" SMALLINT CS_INT, "ExternCode" NVARCHAR(30), "CardCode" NVARCHAR(15), "CardName" NVARCHAR(200), "StatemNo" INTEGER CS_INT, "DocNum" NVARCHAR(27), "PaymCreat" NVARCHAR(1) DEFAULT 'N', "LineStatus" NVARCHAR(1), "VisOrder" INTEGER CS_INT, "DocNumType" NVARCHAR(1) DEFAULT 'D', "Memo2" NVARCHAR(254), "PaymentRef" NVARCHAR(35), "autoCreate" NVARCHAR(1) DEFAULT 'M', "BSLineDate" LONGDATE CS_LONGDATE, "BSValuDate" LONGDATE CS_LONGDATE, "InOpCode" INTEGER CS_INT, "Cleared" NVARCHAR(1) DEFAULT 'N', "OposAct" NVARCHAR(50), "DebAmntLC" DECIMAL(21,6) CS_FIXED, "CredAmntLC" DECIMAL(21,6) CS_FIXED, "ExchngRate" DECIMAL(21,6) CS_FIXED, "BPIBAN" NVARCHAR(50), "Fee" DECIMAL(21,6) CS_FIXED, "PmnPstDate" LONGDATE CS_LONGDATE, "PmnValDate" LONGDATE CS_LONGDATE, "LnDocDate" LONGDATE CS_LONGDATE, "VatAmntLC" DECIMAL(21,6) CS_FIXED, "VatAmntFC" DECIMAL(21,6) CS_FIXED, "JDTID" INTEGER CS_INT, "PmntID" INTEGER CS_INT, "ObjCrtType" SMALLINT CS_INT DEFAULT 24, "PstMethod" NVARCHAR(1) DEFAULT 'C', "FeeAct" NVARCHAR(15), "FeeProfitC" NVARCHAR(8), "FeeProj" NVARCHAR(20), "BpBankCode" NVARCHAR(30), "FeeProfit2" NVARCHAR(8), "FeeProfit3" NVARCHAR(8), "FeeProfit4" NVARCHAR(8), "FeeProfit5" NVARCHAR(8), "ApplWTSum" DECIMAL(21,6) CS_FIXED, "InfoLog" NVARCHAR(254), "LineOrigin" NVARCHAR(1) DEFAULT 'R', "BPSwift" NVARCHAR(50), "Source" NVARCHAR(1) DEFAULT 'I', "PayOrderNo" INTEGER CS_INT, "TaxIDNum" NVARCHAR(32), "PONumber" INTEGER CS_INT, "FormatName" NVARCHAR(254), "FileCRC" NVARCHAR(32), "FolioPref" NVARCHAR(4), "FolioNum" INTEGER CS_INT, "BPLIdPmn" INTEGER CS_INT, "BPAcctName" NVARCHAR(250), "EnOposAct" NCLOB MEMORY THRESHOLD 1000, "EnBPIBAN" NCLOB MEMORY THRESHOLD 1000, "EncryptIV" NVARCHAR(100), "DPPStatus" NVARCHAR(1) DEFAULT 'N', "CreateDate" LONGDATE CS_LONGDATE, "CtrlAcct" NVARCHAR(15), "eDocConfCd" NVARCHAR(50), PRIMARY KEY ("AcctCode", "Sequence")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE CPBTREE INDEX "OBNK_MATCH_ID" ON "SBODEMOPT"."OBNK" ( "BankMatch" ASC )