CREATE COLUMN TABLE "SBODEMOPT"."AITB" ("ItmsGrpCod" SMALLINT CS_INT NOT NULL , "ItmsGrpNam" NVARCHAR(100), "Locked" NVARCHAR(1) DEFAULT 'N', "DataSource" NVARCHAR(1) DEFAULT 'N', "UserSign" SMALLINT CS_INT, "BalInvntAc" NVARCHAR(15), "SaleCostAc" NVARCHAR(15), "TransferAc" NVARCHAR(15), "RevenuesAc" NVARCHAR(15), "VarianceAc" NVARCHAR(15), "DecreasAc" NVARCHAR(15), "IncreasAc" NVARCHAR(15), "ReturnAc" NVARCHAR(15), "ExpensesAc" NVARCHAR(15), "EURevenuAc" NVARCHAR(15), "EUExpensAc" NVARCHAR(15), "FrRevenuAc" NVARCHAR(15), "FrExpensAc" NVARCHAR(15), "ExmptIncom" NVARCHAR(15), "CycleCode" SMALLINT CS_INT, "Alert" NVARCHAR(1) DEFAULT 'N', "PriceDifAc" NVARCHAR(15), "ExchangeAc" NVARCHAR(15), "BalanceAcc" NVARCHAR(15), "PurchaseAc" NVARCHAR(15), "PAReturnAc" NVARCHAR(15), "PurchOfsAc" NVARCHAR(15), "ShpdGdsAct" NVARCHAR(15), "VatRevAct" NVARCHAR(15), "DecresGlAc" NVARCHAR(15), "IncresGlAc" NVARCHAR(15), "InvntSys" NVARCHAR(1), "PlaningSys" NVARCHAR(1) DEFAULT 'N', "PrcrmntMtd" NVARCHAR(1) DEFAULT 'B', "OrdrIntrvl" SMALLINT CS_INT, "OrdrMulti" DECIMAL(21,6) CS_FIXED, "MinOrdrQty" DECIMAL(21,6) CS_FIXED, "LeadTime" INTEGER CS_INT, "StokRvlAct" NVARCHAR(15), "StkOffsAct" NVARCHAR(15), "WipAcct" NVARCHAR(15), "WipVarAcct" NVARCHAR(15), "CostRvlAct" NVARCHAR(15), "CstOffsAct" NVARCHAR(15), "ExpClrAct" NVARCHAR(15), "ExpOfstAct" NVARCHAR(15), "Object" NVARCHAR(20) DEFAULT '52', "logInstanc" INTEGER CS_INT NOT NULL , "createDate" LONGDATE CS_LONGDATE, "userSign2" SMALLINT CS_INT, "updateDate" LONGDATE CS_LONGDATE, "ARCMAct" NVARCHAR(15), "ARCMFrnAct" NVARCHAR(15), "ARCMEUAct" NVARCHAR(15), "ARCMExpAct" NVARCHAR(15), "APCMAct" NVARCHAR(15), "APCMFrnAct" NVARCHAR(15), "APCMEUAct" NVARCHAR(15), "RevRetAct" NVARCHAR(15), "ItemClass" NVARCHAR(1) DEFAULT '2', "OSvcCode" INTEGER CS_INT DEFAULT -1, "ISvcCode" INTEGER CS_INT DEFAULT -1, "ServiceGrp" INTEGER CS_INT DEFAULT -1, "NCMCode" INTEGER CS_INT DEFAULT -1, "MatType" NVARCHAR(3) DEFAULT '1', "MatGrp" INTEGER CS_INT DEFAULT -1, "ProductSrc" NVARCHAR(2) DEFAULT '0', "NegStckAct" NVARCHAR(15), "StkInTnAct" NVARCHAR(15), "PurBalAct" NVARCHAR(15), "WhICenAct" NVARCHAR(15), "WhOCenAct" NVARCHAR(15), "WipOffset" NVARCHAR(15), "StockOffst" NVARCHAR(15), "UgpEntry" INTEGER CS_INT, "IUoMEntry" INTEGER CS_INT, "ToleranDay" INTEGER CS_INT, "RuleCode" NVARCHAR(2), "CompoWH" NVARCHAR(1) DEFAULT 'B', "FreeChrgSA" NVARCHAR(15), "FreeChrgPU" NVARCHAR(15), "RawMtrl" NVARCHAR(1) DEFAULT 'N', PRIMARY KEY ("ItmsGrpCod", "logInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMOPT"."AITB" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$ItmsGrpNam$logInstanc$','ItmsGrpNam','logInstanc'));
CREATE CPBTREE INDEX "AITB_GROUP_NAME" ON "SBODEMOPT"."AITB" ( "ItmsGrpNam" ASC, "logInstanc" ASC )