CREATE COLUMN TABLE "SBODEMOPT"."APLN" ("ListNum" SMALLINT CS_INT NOT NULL , "ListName" NVARCHAR(32) NOT NULL , "BASE_NUM" SMALLINT CS_INT, "Factor" DECIMAL(21,6) CS_FIXED, "RoundSys" SMALLINT CS_INT DEFAULT 0, "GroupCode" SMALLINT CS_INT DEFAULT 1, "DataSource" NVARCHAR(1) DEFAULT 'N', "SPPCounter" INTEGER CS_INT, "UserSign" SMALLINT CS_INT, "IsGrossPrc" NVARCHAR(1) DEFAULT 'N', "LogInstanc" INTEGER CS_INT DEFAULT 0 NOT NULL , "UserSign2" SMALLINT CS_INT, "UpdateDate" LONGDATE CS_LONGDATE, "ValidFor" NVARCHAR(1) DEFAULT 'Y', "ValidFrom" LONGDATE CS_LONGDATE, "ValidTo" LONGDATE CS_LONGDATE, "CreateDate" LONGDATE CS_LONGDATE, "PrimCurr" NVARCHAR(3), "AddCurr1" NVARCHAR(3), "AddCurr2" NVARCHAR(3), "RoundRule" NVARCHAR(1) DEFAULT 'R', "ExtAmount" DECIMAL(21,6) CS_FIXED, "RndFrmtInt" NVARCHAR(10), "RndFrmtDec" NVARCHAR(10), PRIMARY KEY ("ListNum", "LogInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE UNIQUE INDEX "APLN_LIST_NAME" ON "SBODEMOPT"."APLN" ( "ListName" ASC, "LogInstanc" ASC )