CREATE COLUMN TABLE "SBODEMOPT"."ATRO" ("AbsEntry" INTEGER CS_INT NOT NULL , "NextNum" INTEGER CS_INT NOT NULL , "PostDate" LONGDATE CS_LONGDATE, "EDocGenTyp" NVARCHAR(1) DEFAULT 'N', "EDocExpFrm" INTEGER CS_INT, "TranspNum" NVARCHAR(100), "Expiration" LONGDATE CS_LONGDATE, "Vehicle" NVARCHAR(10), "TrailerID" NVARCHAR(10), "Carrier" NVARCHAR(15), "IssueGate" INTEGER CS_INT DEFAULT 0 NOT NULL , "AtcEntry" INTEGER CS_INT, "LogInstanc" INTEGER CS_INT DEFAULT 0 NOT NULL , "UpdateDate" LONGDATE CS_LONGDATE, "UserSign" SMALLINT CS_INT, "UserSign2" SMALLINT CS_INT, "CreateDate" LONGDATE CS_LONGDATE, "UpdateTS" INTEGER CS_INT, "CANCELED" NVARCHAR(1) DEFAULT 'N', "Weight" DECIMAL(21,6) CS_FIXED, "WghtUnit" SMALLINT CS_INT, "TotalLC" DECIMAL(21,6) CS_FIXED, "WhsCode" NVARCHAR(8) NOT NULL , "COTcode" NVARCHAR(3), PRIMARY KEY ("AbsEntry", "LogInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE UNIQUE CPBTREE INDEX "ATRO_NEXT_NUM_U" ON "SBODEMOPT"."ATRO" ( "NextNum" ASC, "WhsCode" ASC, "IssueGate" ASC, "LogInstanc" ASC )