CREATE COLUMN TABLE "IMCYC"."CPI21" ("DocEntry" INTEGER CS_INT NOT NULL , "ObjectType" NVARCHAR(20) DEFAULT '163', "LogInstanc" INTEGER CS_INT DEFAULT 0, "RefType" CHAR(1) CS_FIXEDSTRING 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), PRIMARY KEY INVERTED VALUE ("DocEntry", "LineNum", "RefType")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE INDEX "CPI21_DOC_ENTRY" ON "IMCYC"."CPI21" ( "DocEntry" ASC )