CREATE COLUMN TABLE "SBODEMOPT"."OTRA" ("DocEntry" INTEGER CS_INT NOT NULL , "DocNum" INTEGER CS_INT, "BaseDocNum" INTEGER CS_INT, "Printed" NVARCHAR(1) DEFAULT 'N', "ObjType" NVARCHAR(20), "DocDate" LONGDATE CS_LONGDATE, "DocDueDate" LONGDATE CS_LONGDATE, "CardCode" NVARCHAR(15), "CardName" NVARCHAR(100), "FreZoneNum" NVARCHAR(8), "Shiper" NVARCHAR(100), "Address" NVARCHAR(254), "FromCntry" NVARCHAR(100), "ToCntry" NVARCHAR(100), "FromPort" NVARCHAR(100), "ToPort" NVARCHAR(100), "AirPlane" NVARCHAR(50), "AirPlanNum" NVARCHAR(40), "TotalFob" DECIMAL(21,6) CS_FIXED, "Taxes" DECIMAL(21,6) CS_FIXED, "Insurance" DECIMAL(21,6) CS_FIXED, "Others" DECIMAL(21,6) CS_FIXED, "TotalCif" DECIMAL(21,6) CS_FIXED, "Ref1" NVARCHAR(11), "Ref2" NVARCHAR(11), "Comments" NVARCHAR(254), "GroupNum" SMALLINT CS_INT, "DocTime" SMALLINT CS_INT, "SlpCode" INTEGER CS_INT DEFAULT -1, "TrnspCode" SMALLINT CS_INT DEFAULT -1, "PartSupply" NVARCHAR(1) DEFAULT 'Y', "ImportEnt" INTEGER CS_INT, "CreateDate" LONGDATE CS_LONGDATE, "UpdateDate" LONGDATE CS_LONGDATE, "NumForPrn" NVARCHAR(16), "PurPackMsr" NVARCHAR(8), "Series" INTEGER CS_INT, "BaseDocObj" SMALLINT CS_INT, "DataSource" NVARCHAR(1) DEFAULT 'N', "UserSign" SMALLINT CS_INT, PRIMARY KEY ("DocEntry")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMOPT"."OTRA" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$BaseDocNum$BaseDocObj$','BaseDocNum','BaseDocObj'));
CREATE INDEX "OTRA_NUM" ON "SBODEMOPT"."OTRA" ( "DocNum" ASC );
CREATE INDEX "OTRA_BASE_DOC" ON "SBODEMOPT"."OTRA" ( "BaseDocNum" ASC, "BaseDocObj" ASC );
CREATE INDEX "OTRA_OBJECT" ON "SBODEMOPT"."OTRA" ( "ObjType" ASC );
CREATE INDEX "OTRA_SERIES" ON "SBODEMOPT"."OTRA" ( "Series" ASC )