CREATE COLUMN TABLE "SBODEMOUS"."ACHO" ("CheckKey" INTEGER CS_INT NOT NULL , "CheckNum" INTEGER CS_INT, "BankNum" NVARCHAR(30), "Branch" NVARCHAR(50), "BankName" NVARCHAR(250), "CheckDate" LONGDATE CS_LONGDATE, "DpstAcct" NVARCHAR(50), "DpstBranch" SMALLINT CS_INT, "AcctNum" NVARCHAR(50), "Details" NVARCHAR(254), "TransRef" NVARCHAR(11), "PmntDate" LONGDATE CS_LONGDATE, "PmntNum" INTEGER CS_INT DEFAULT 0, "CheckSum" DECIMAL(21,6) CS_FIXED, "Trnsfrable" NVARCHAR(1) DEFAULT 'N', "VendorCode" NVARCHAR(15), "Currency" NVARCHAR(3), "Canceled" NVARCHAR(1) DEFAULT 'N', "CardOrAcct" NVARCHAR(1) DEFAULT 'C', "Printed" NVARCHAR(1) DEFAULT 'N', "VendorName" NVARCHAR(200), "TotalWords" NVARCHAR(254), "Signature" NVARCHAR(30), "CheckAcct" NVARCHAR(15), "TransNum" INTEGER CS_INT DEFAULT 0, "LinesSum" DECIMAL(21,6) CS_FIXED, "Deduction" DECIMAL(21,6) CS_FIXED, "DdctPrcnt" DECIMAL(21,6) CS_FIXED, "Address" NVARCHAR(254), "CreateJdt" NVARCHAR(1) DEFAULT 'Y', "UpdateDate" LONGDATE CS_LONGDATE, "CreateDate" LONGDATE CS_LONGDATE, "VatTotal" 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 , "ObjType" NVARCHAR(20) DEFAULT '57', "CountryCod" NVARCHAR(3), "AddrName" NVARCHAR(50), "PrnConfrm" NVARCHAR(1) DEFAULT 'N', "BnkActKey" INTEGER CS_INT, "CancelDate" LONGDATE CS_LONGDATE, "ManualChk" NVARCHAR(1) DEFAULT 'N', "BPLId" INTEGER CS_INT, "BPLName" NVARCHAR(200), "VATRegNum" NVARCHAR(32), "Endorse" NVARCHAR(1) DEFAULT 'N', "EndorsChNo" INTEGER CS_INT, "UserSign2" SMALLINT CS_INT, "DPPStatus" NVARCHAR(1) DEFAULT 'N', "AtcEntry" INTEGER CS_INT, "Attachment" NCLOB MEMORY THRESHOLD 1000, "ECheck" NVARCHAR(1) DEFAULT 'N', "VersionNum" NVARCHAR(13), "EnAcctNum" NCLOB MEMORY THRESHOLD 1000, "EncryptIV" NVARCHAR(100), PRIMARY KEY ("CheckKey", "LogInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE CPBTREE INDEX "ACHO_VPM_NUM" ON "SBODEMOUS"."ACHO" ( "PmntNum" ASC );
CREATE CPBTREE INDEX "ACHO_TRANS_NUM" ON "SBODEMOUS"."ACHO" ( "TransNum" ASC )