CREATE COLUMN TABLE "SBODEMOUS"."BEM2" ("RowNumber" INTEGER CS_INT NOT NULL , "BEMDocType" INTEGER CS_INT NOT NULL , "BEMDocName" NVARCHAR(60), "ScopeKey" NVARCHAR(36), "RepId" NVARCHAR(36) NOT NULL , "StartDate" LONGDATE CS_LONGDATE, "EndDate" LONGDATE CS_LONGDATE, "CreateDate" LONGDATE CS_LONGDATE, "B1ObjCode" NVARCHAR(20), "ItemCode" NVARCHAR(60), "WhseCode" NVARCHAR(60), "UomCode" NVARCHAR(3), "InQty" DECIMAL(21,6) CS_FIXED, "OutQty" DECIMAL(21,6) CS_FIXED, "Quantity" DECIMAL(21,6) CS_FIXED, "VendorCode" NVARCHAR(60), "WOREntry" NVARCHAR(60), "RoleCode" NVARCHAR(2) DEFAULT 'MP', "RscCode" NVARCHAR(60), "RscQty" DECIMAL(21,6) CS_FIXED, "RscUomCode" NVARCHAR(3), "Project" NVARCHAR(60), "ToWhseCode" NVARCHAR(60), "CostCenter" NVARCHAR(8), PRIMARY KEY ("RowNumber", "BEMDocType", "RepId")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE INDEX "BEM2_REP_ID" ON "SBODEMOUS"."BEM2" ( "RepId" ASC )