CREATE COLUMN TABLE "SBODEMOUS"."ECM2" ("AbsEntry" INTEGER CS_INT NOT NULL , "Code" INTEGER CS_INT NOT NULL , "ParentID" INTEGER CS_INT, "ActType" INTEGER CS_INT DEFAULT 0, "ActDesc" NVARCHAR(100), "ActStatus" NVARCHAR(1) DEFAULT 'N', "IsRemoved" NVARCHAR(1) DEFAULT 'N', "ActMessage" NVARCHAR(254), "ActEnv" INTEGER CS_INT DEFAULT -1, "BPLId" INTEGER CS_INT DEFAULT -1, "Submits" SMALLINT CS_INT, "ObjectID" NVARCHAR(50), "ReportID" NVARCHAR(50), "SrcObjType" NVARCHAR(20), "SrcObjAbs" INTEGER CS_INT, "Cancel" NVARCHAR(1) DEFAULT 'N', "AssignedID" NVARCHAR(100), "DocBtch" NVARCHAR(50), "DocBtchLn" SMALLINT CS_INT, "GenType" NVARCHAR(1) DEFAULT 'N', "TestMode" NVARCHAR(1) DEFAULT 'N', "PeriodType" NVARCHAR(1), "PeriodNum" INTEGER CS_INT, "Year" SMALLINT CS_INT, "DateFrom" LONGDATE CS_LONGDATE, "DateTo" LONGDATE CS_LONGDATE, "UserSign" SMALLINT CS_INT, "CreateDate" LONGDATE CS_LONGDATE, "CreateTS" INTEGER CS_INT, "UserSign2" SMALLINT CS_INT, "UpdateDate" LONGDATE CS_LONGDATE, "UpdateTS" INTEGER CS_INT, "LogInstanc" SMALLINT CS_INT, "SchedJobID" INTEGER CS_INT, "GUID" NVARCHAR(100) NOT NULL , "Authority" NVARCHAR(16), "CancStatus" NVARCHAR(1) DEFAULT 'T', "EDocType" INTEGER CS_INT, "EDocNum" NVARCHAR(100), "ProcTarget" NVARCHAR(40), "Emergency" NVARCHAR(1) DEFAULT 'N', "SttsReason" NVARCHAR(3), "SttsDescr" NVARCHAR(254), "U_B1SYS_XMLAmount" DECIMAL(21,6) CS_FIXED, "U_B1SYS_SendDateINTM" LONGDATE CS_LONGDATE, PRIMARY KEY ("AbsEntry")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMOUS"."ECM2" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$SrcObjType$SrcObjAbs$Code$','SrcObjType','SrcObjAbs','Code'));
CREATE UNIQUE CPBTREE INDEX "ECM2_ACTION" ON "SBODEMOUS"."ECM2" ( "Code" ASC, "AbsEntry" ASC );
CREATE CPBTREE INDEX "ECM2_DOCREF" ON "SBODEMOUS"."ECM2" ( "SrcObjType" ASC, "SrcObjAbs" ASC, "Code" ASC );
CREATE UNIQUE CPBTREE INDEX "ECM2_GUID" ON "SBODEMOUS"."ECM2" ( "GUID" ASC )