CREATE COLUMN TABLE "SBODEMOPT"."DPO21" ("DocEntry" INTEGER CS_INT NOT NULL , "ObjectType" NVARCHAR(20) DEFAULT '204', "LogInstanc" INTEGER CS_INT DEFAULT 0, "RefType" NVARCHAR(1) DEFAULT 'S' NOT NULL , "LineNum" INTEGER CS_INT NOT NULL , "RefDocEntr" INTEGER CS_INT, "RefDocNum" INTEGER CS_INT, "ExtDocNum" NVARCHAR(100), "RefObjType" NVARCHAR(20), "AccessKey" NVARCHAR(100), "IssueDate" LONGDATE CS_LONGDATE, "IssuerCNPJ" NVARCHAR(100), "IssuerCode" NVARCHAR(10), "Model" NVARCHAR(6), "Series" NVARCHAR(3), "Number" INTEGER CS_INT, "RefAccKey" NVARCHAR(100), "RefAmount" DECIMAL(21,6) CS_FIXED, "SubSeries" NVARCHAR(3), "Remark" NVARCHAR(254), "LinkRefTyp" NVARCHAR(20) DEFAULT '00', PRIMARY KEY ("DocEntry", "LineNum", "RefType")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE INDEX "DPO21_DOC_ENTRY" ON "SBODEMOPT"."DPO21" ( "DocEntry" ASC )