CREATE COLUMN TABLE "SBODEMODE"."OCHH" ("CheckKey" INTEGER CS_INT NOT NULL , "CheckNum" INTEGER CS_INT, "BankCode" NVARCHAR(30), "Branch" NVARCHAR(50), "CashCheck" NVARCHAR(15), "CheckDate" LONGDATE CS_LONGDATE, "Details" NVARCHAR(20), "CardCode" NVARCHAR(15), "RcptDate" LONGDATE CS_LONGDATE, "RcptNum" INTEGER CS_INT, "CheckSum" DECIMAL(21,6) CS_FIXED, "Trnsfrable" NVARCHAR(1) DEFAULT 'N', "Deposited" NVARCHAR(1) DEFAULT 'N', "Converted" NVARCHAR(1) DEFAULT 'N', "Vendor" NVARCHAR(15), "TransNum" INTEGER CS_INT, "DepNum2" INTEGER CS_INT DEFAULT 0, "DpstAbs" INTEGER CS_INT, "BankAcct" NVARCHAR(15), "AcctNum" NVARCHAR(50), "Currency" NVARCHAR(3), "Canceled" NVARCHAR(1) DEFAULT 'N', "RcptLineId" INTEGER CS_INT, "Transfered" NVARCHAR(1) DEFAULT 'N', "Instance" SMALLINT CS_INT DEFAULT 0, "UserID" SMALLINT CS_INT, "BankCountr" NVARCHAR(3), "Project" NVARCHAR(20), "CanceJEAbs" INTEGER CS_INT, "TempJEAbs" INTEGER CS_INT, "CardName" NVARCHAR(200), "FiscalID" NVARCHAR(100), "OrigIssdBy" NVARCHAR(254), "RejeByBank" NVARCHAR(1) DEFAULT 'N', "EnAcctNum" NCLOB MEMORY THRESHOLD 1000, "EncryptIV" NVARCHAR(100), "DPPStatus" NVARCHAR(1) DEFAULT 'N', "VersionNum" NVARCHAR(13), "DataSource" NVARCHAR(1) DEFAULT 'N', PRIMARY KEY ("CheckKey")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMODE"."OCHH" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$RcptNum$RcptLineId$','RcptNum','RcptLineId'));
CREATE INDEX "OCHH_RECEIPT" ON "SBODEMODE"."OCHH" ( "RcptNum" ASC, "RcptLineId" ASC );
CREATE INDEX "OCHH_DEP_ABS1" ON "SBODEMODE"."OCHH" ( "DpstAbs" ASC );
CREATE INDEX "OCHH_CHECK_NUM" ON "SBODEMODE"."OCHH" ( "CheckNum" ASC );
CREATE INDEX "OCHH_DEP_ABS2" ON "SBODEMODE"."OCHH" ( "DepNum2" ASC )