CREATE COLUMN TABLE "SBODEMOUS"."OACT" ("AcctCode" NVARCHAR(15) NOT NULL , "AcctName" NVARCHAR(200), "CurrTotal" DECIMAL(21,6) CS_FIXED, "EndTotal" DECIMAL(21,6) CS_FIXED, "Finanse" NVARCHAR(1) DEFAULT 'N', "Groups" NVARCHAR(8), "Budget" NVARCHAR(1) DEFAULT 'N', "Frozen" NVARCHAR(1) DEFAULT 'N', "Free_2" NVARCHAR(1), "Postable" NVARCHAR(1) DEFAULT 'Y', "Fixed" NVARCHAR(1), "Levels" SMALLINT CS_INT DEFAULT 2, "ExportCode" NVARCHAR(10), "GrpLine" INTEGER CS_INT, "FatherNum" NVARCHAR(15), "AccntntCod" NVARCHAR(15), "CashBox" NVARCHAR(1) DEFAULT 'N', "GroupMask" SMALLINT CS_INT DEFAULT 1, "RateTrans" NVARCHAR(1) DEFAULT 'Y', "TaxIncome" NVARCHAR(1) DEFAULT 'N', "ExmIncome" NVARCHAR(1) DEFAULT 'N', "ExtrMatch" INTEGER CS_INT, "IntrMatch" INTEGER CS_INT, "ActType" NVARCHAR(1) DEFAULT 'N', "Transfered" NVARCHAR(1) DEFAULT 'N', "BlncTrnsfr" NVARCHAR(1) DEFAULT 'N', "OverType" NVARCHAR(1) DEFAULT 'N', "OverCode" NVARCHAR(8), "SysMatch" INTEGER CS_INT DEFAULT -1, "PrevYear" NVARCHAR(1) DEFAULT 'N', "ActCurr" NVARCHAR(3), "RateDifAct" NVARCHAR(15), "SysTotal" DECIMAL(21,6) CS_FIXED, "FcTotal" DECIMAL(21,6) CS_FIXED, "Protected" NVARCHAR(1) DEFAULT 'N', "RealAcct" NVARCHAR(1) DEFAULT 'N', "Advance" NVARCHAR(1) DEFAULT 'Y', "CreateDate" LONGDATE CS_LONGDATE, "UpdateDate" LONGDATE CS_LONGDATE, "FrgnName" NVARCHAR(200), "Details" NVARCHAR(254), "ExtraSum" DECIMAL(21,6) CS_FIXED, "Project" NVARCHAR(20), "RevalMatch" NVARCHAR(1) DEFAULT 'N', "DataSource" NVARCHAR(1) DEFAULT 'N', "LocMth" NVARCHAR(1) DEFAULT 'Y', "MTHCounter" INTEGER CS_INT, "BNKCounter" INTEGER CS_INT, "UserSign" SMALLINT CS_INT, "LocManTran" NVARCHAR(1) DEFAULT 'N', "LogInstanc" INTEGER CS_INT DEFAULT 0, "ObjType" NVARCHAR(20) DEFAULT '1', "ValidFor" NVARCHAR(1) DEFAULT 'N', "ValidFrom" LONGDATE CS_LONGDATE, "ValidTo" LONGDATE CS_LONGDATE, "ValidComm" NVARCHAR(30), "FrozenFor" NVARCHAR(1) DEFAULT 'N', "FrozenFrom" LONGDATE CS_LONGDATE, "FrozenTo" LONGDATE CS_LONGDATE, "FrozenComm" NVARCHAR(30), "Counter" INTEGER CS_INT DEFAULT 0, "Segment_0" NVARCHAR(20), "Segment_1" NVARCHAR(20), "Segment_2" NVARCHAR(20), "Segment_3" NVARCHAR(20), "Segment_4" NVARCHAR(20), "Segment_5" NVARCHAR(20), "Segment_6" NVARCHAR(20), "Segment_7" NVARCHAR(20), "Segment_8" NVARCHAR(20), "Segment_9" NVARCHAR(20), "FormatCode" NVARCHAR(210), "CfwRlvnt" NVARCHAR(1) DEFAULT 'N', "ExchRate" NVARCHAR(1) DEFAULT 'Y', "RevalAcct" NVARCHAR(15), "LastRevBal" DECIMAL(21,6) CS_FIXED, "LastRevDat" LONGDATE CS_LONGDATE, "DfltVat" NVARCHAR(8), "VatChange" NVARCHAR(1) DEFAULT 'Y', "Category" INTEGER CS_INT, "TransCode" NVARCHAR(4), "OverCode5" NVARCHAR(8), "OverCode2" NVARCHAR(8), "OverCode3" NVARCHAR(8), "OverCode4" NVARCHAR(8), "DfltTax" NVARCHAR(8), "TaxPostAcc" NVARCHAR(1) DEFAULT 'N', "AcctStrLe" NVARCHAR(2), "MeaUnit" NVARCHAR(10), "BalDirect" NVARCHAR(4) DEFAULT '0', "UserSign2" SMALLINT CS_INT, "PlngLevel" NVARCHAR(2), "MultiLink" NVARCHAR(1) DEFAULT 'N', "PrjRelvnt" NVARCHAR(1) DEFAULT 'N', "Dim1Relvnt" NVARCHAR(1) DEFAULT 'N', "Dim2Relvnt" NVARCHAR(1) DEFAULT 'N', "Dim3Relvnt" NVARCHAR(1) DEFAULT 'N', "Dim4Relvnt" NVARCHAR(1) DEFAULT 'N', "Dim5Relvnt" NVARCHAR(1) DEFAULT 'N', "AccrualTyp" NVARCHAR(1) DEFAULT 'N', "DatevAcct" NVARCHAR(8), "DatevAutoA" NVARCHAR(1) DEFAULT 'N', "DatevFirst" NVARCHAR(1) DEFAULT 'Y', "SnapShotId" INTEGER CS_INT DEFAULT 0, "PCN874Rpt" NVARCHAR(1) DEFAULT 'N', "SCAdjust" NVARCHAR(1) DEFAULT 'N', "BPLId" INTEGER CS_INT, "BPLName" NVARCHAR(200), "SubLedgerN" NVARCHAR(60), "VATRegNum" NVARCHAR(32), "ActId" NVARCHAR(210) NOT NULL , "ClosingAcc" NVARCHAR(15), "PurpCode" NVARCHAR(2), "RefCode" NVARCHAR(30), "BlocManPos" NVARCHAR(1) DEFAULT 'N', "PriAccCode" NVARCHAR(15), "CstAccOnly" NVARCHAR(1) DEFAULT 'N', "AlloweFrom" DECIMAL(21,6) CS_FIXED, "AllowedTo" DECIMAL(21,6) CS_FIXED, "BalanceA" NVARCHAR(1) DEFAULT 'N', "RmrkTmpt" INTEGER CS_INT, "CemRelvnt" NVARCHAR(1) DEFAULT 'N', "CemCode" NVARCHAR(20), "StdActCode" NVARCHAR(35), "TaxonCode" NVARCHAR(15), "InClassTyp" INTEGER CS_INT, "InClassCat" INTEGER CS_INT, "ExClassTyp" INTEGER CS_INT, "ExClassCat" INTEGER CS_INT, "OffcCode" NVARCHAR(15), "EUBPRelvnt" NVARCHAR(1) DEFAULT 'N', PRIMARY KEY ("AcctCode")) UNLOAD PRIORITY 0  AUTO MERGE ;
CREATE CPBTREE INDEX "OACT_INTER_KEY" ON "SBODEMOUS"."OACT" ( "FatherNum" ASC );
CREATE CPBTREE INDEX "OACT_CURRENCY" ON "SBODEMOUS"."OACT" ( "ActCurr" ASC );
CREATE CPBTREE INDEX "OACT_FORMAT" ON "SBODEMOUS"."OACT" ( "FormatCode" ASC );
CREATE CPBTREE INDEX "OACT_COUNTER" ON "SBODEMOUS"."OACT" ( "Counter" ASC );
CREATE UNIQUE CPBTREE INDEX "OACT_IDENTIFIER" ON "SBODEMOUS"."OACT" ( "ActId" ASC )