CREATE COLUMN TABLE "IMCYC"."RDOC" ("DocCode" NVARCHAR(8) NOT NULL , "DocName" NVARCHAR(120), "Author" NVARCHAR(155), "Notes" NVARCHAR(254), "Width" SMALLINT CS_INT DEFAULT 595, "Height" SMALLINT CS_INT DEFAULT 842, "LMargin" SMALLINT CS_INT DEFAULT 10, "RMargin" SMALLINT CS_INT DEFAULT 30, "TMargin" SMALLINT CS_INT DEFAULT 10, "BMargin" SMALLINT CS_INT DEFAULT 10, "CanChange" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "PaperSize" NVARCHAR(100) DEFAULT 'A4', "Oreint" CHAR(1) CS_FIXEDSTRING DEFAULT 'P', "GridSize" SMALLINT CS_INT DEFAULT 10, "GridType" CHAR(1) CS_FIXEDSTRING DEFAULT '1', "ShowGrid" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "SnapGrid" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "Picture" NCLOB MEMORY THRESHOLD 1000, "TypeCode" NVARCHAR(4), "FrgnReport" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CanSort" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "LeaderCode" NVARCHAR(8), "FollowCode" NVARCHAR(8), "SwapOnScrn" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ScreenFont" NVARCHAR(50) DEFAULT 'Arial', "ScrFOffset" SMALLINT CS_INT DEFAULT -1, "SwpInEmail" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "EmailFont" NVARCHAR(50) DEFAULT 'Arial', "EmFOffset" SMALLINT CS_INT DEFAULT -1, "QString" NCLOB MEMORY THRESHOLD 1000, "QType" CHAR(1) CS_FIXEDSTRING DEFAULT 'R', "Language" INTEGER CS_INT, "RobjCode" INTEGER CS_INT DEFAULT 0, "ExtName" NCLOB MEMORY THRESHOLD 1000, "ExtOnErr" CHAR(1) CS_FIXEDSTRING DEFAULT 'S', "NumRepArs" SMALLINT CS_INT DEFAULT 1, "AlgnFooter" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "TimeFormat" CHAR(1) CS_FIXEDSTRING DEFAULT '0', "DateFormat" CHAR(1) CS_FIXEDSTRING DEFAULT '0', "DateSep" CHAR(1) CS_FIXEDSTRING, "DecSep" CHAR(1) CS_FIXEDSTRING, "ThousSep" CHAR(1) CS_FIXEDSTRING, "Printer" NVARCHAR(100), "NumLayPage" INTEGER CS_INT, "NumCopy" INTEGER CS_INT DEFAULT 1, "GbiSupport" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Use1stPrtr" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Prtr1st" NVARCHAR(100), "Shading" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "Template" BLOB MEMORY THRESHOLD 1000, "Category" CHAR(1) CS_FIXEDSTRING DEFAULT 'P', "CreateDate" LONGDATE CS_LONGDATE, "UpdateDate" LONGDATE CS_LONGDATE, "UserSign" SMALLINT CS_INT, "UserSign2" SMALLINT CS_INT, "Status" CHAR(1) CS_FIXEDSTRING DEFAULT 'A', "B1Version" NVARCHAR(20), "CRVersion" NVARCHAR(20), "Local" NVARCHAR(2), "UseSysPref" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "ForMobile" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "TypeDetail" NVARCHAR(254), "IsIMCE" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CsUrl" NVARCHAR(254), "RptHash" NVARCHAR(254), PRIMARY KEY ("DocCode")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "IMCYC"."RDOC" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$TypeCode$DocName$','TypeCode','DocName'));
CREATE INDEX "RDOC_TYPE" ON "IMCYC"."RDOC" ( "TypeCode" ASC );
CREATE INDEX "RDOC_TYPENAME" ON "IMCYC"."RDOC" ( "TypeCode" ASC, "DocName" ASC )