CREATE COLUMN TABLE "IMCYC"."OIQR" ("DocEntry" INTEGER CS_INT NOT NULL , "CreateDate" LONGDATE CS_LONGDATE, "DocTime" SMALLINT CS_INT, "IOffIncAcc" NVARCHAR(15), "DOffDecAcc" NVARCHAR(15), "DocDate" LONGDATE CS_LONGDATE, "Reference" NVARCHAR(11), "Comments" NVARCHAR(254), "DocDueDate" LONGDATE CS_LONGDATE, "DataSource" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "UserSign" SMALLINT CS_INT, "VersionNum" NVARCHAR(11), "JdtNum" INTEGER CS_INT, "Reference2" NVARCHAR(11), "ObjType" NVARCHAR(20) DEFAULT '10000071', "DocNum" INTEGER CS_INT, "Series" SMALLINT CS_INT, "PriceSrc" INTEGER CS_INT DEFAULT 3, "PriceList" INTEGER CS_INT, "JrnlMemo" NVARCHAR(50), "Status" CHAR(1) CS_FIXEDSTRING DEFAULT 'O', "LogIns" INTEGER CS_INT, "UserSign2" SMALLINT CS_INT, "UpdateDate" LONGDATE CS_LONGDATE, "CountDate" LONGDATE CS_LONGDATE, "CountTime" INTEGER CS_INT, "WddStatus" CHAR(1) CS_FIXEDSTRING DEFAULT '-', "DraftKey" INTEGER CS_INT DEFAULT -1, "Printed" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DocTotal" DECIMAL(21,6) CS_FIXED, "BPLId" INTEGER CS_INT, "BPLName" NVARCHAR(100), "UpdateTS" INTEGER CS_INT, "CopyOption" CHAR(1) CS_FIXEDSTRING DEFAULT '0', "BaseEntry" INTEGER CS_INT, "PIndicator" NVARCHAR(10) DEFAULT ' ', "FinncPriod" INTEGER CS_INT, PRIMARY KEY ("DocEntry")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "IMCYC"."OIQR" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$CreateDate$DocTime$','CreateDate','DocTime'));
CREATE INDEX "OIQR_DOC_DATE" ON "IMCYC"."OIQR" ( "DocDate" ASC );
CREATE INDEX "OIQR_CREATEDATE" ON "IMCYC"."OIQR" ( "CreateDate" ASC, "DocTime" ASC )