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