CREATE COLUMN TABLE "SBODEMOPT"."AMRV" ("DocEntry" INTEGER CS_INT NOT NULL , "DocNum" INTEGER CS_INT, "DocDate" LONGDATE CS_LONGDATE, "Ref1" NVARCHAR(11), "Ref2" NVARCHAR(11), "Comments" NVARCHAR(254), "JrnlMemo" NVARCHAR(254), "TransId" INTEGER CS_INT, "DocTime" SMALLINT CS_INT, "RevalType" NVARCHAR(1) DEFAULT 'P', "UpdateDate" LONGDATE CS_LONGDATE, "CreateDate" LONGDATE CS_LONGDATE, "Series" INTEGER CS_INT DEFAULT 0, "TaxDate" LONGDATE CS_LONGDATE, "DataSource" NVARCHAR(1) DEFAULT 'N', "UserSign" SMALLINT CS_INT, "UserSign2" SMALLINT CS_INT, "StationID" INTEGER CS_INT, "RIncmAcct" NVARCHAR(15), "RExpnAcct" NVARCHAR(15), "LogInstanc" INTEGER CS_INT DEFAULT 0 NOT NULL , "ObjType" NVARCHAR(20) DEFAULT '162' NOT NULL , "SeqCode" SMALLINT CS_INT, "Serial" INTEGER CS_INT, "SeriesStr" NVARCHAR(3), "SubStr" NVARCHAR(3), "VersionNum" NVARCHAR(13), "InflaReval" NVARCHAR(1) DEFAULT 'N', "SupplCode" NVARCHAR(254), "CardCode" NVARCHAR(15), "CardName" NVARCHAR(200), "CreatedBy" NVARCHAR(1) DEFAULT 'M', PRIMARY KEY ("DocEntry", "LogInstanc", "ObjType")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMOPT"."AMRV" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$DocNum$LogInstanc$ObjType$','DocNum','LogInstanc','ObjType'));
CREATE INDEX "AMRV_NUM" ON "SBODEMOPT"."AMRV" ( "DocNum" ASC, "LogInstanc" ASC, "ObjType" ASC );
CREATE INDEX "AMRV_SERIES" ON "SBODEMOPT"."AMRV" ( "Series" ASC )