CREATE COLUMN TABLE "SBODEMOUS"."AITW" ("ItemCode" NVARCHAR(50) NOT NULL , "WhsCode" NVARCHAR(8) NOT NULL , "OnHand" DECIMAL(21,6) CS_FIXED, "IsCommited" DECIMAL(21,6) CS_FIXED, "OnOrder" DECIMAL(21,6) CS_FIXED, "Consig" DECIMAL(21,6) CS_FIXED, "Counted" DECIMAL(21,6) CS_FIXED, "WasCounted" NVARCHAR(1) DEFAULT 'N', "UserSign" SMALLINT CS_INT, "MinStock" DECIMAL(21,6) CS_FIXED, "MaxStock" DECIMAL(21,6) CS_FIXED, "MinOrder" DECIMAL(21,6) CS_FIXED, "AvgPrice" DECIMAL(21,6) CS_FIXED, "Locked" NVARCHAR(1) DEFAULT 'N', "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), "PriceDifAc" NVARCHAR(15), "ExchangeAc" NVARCHAR(15), "BalanceAcc" NVARCHAR(15), "PurchaseAc" NVARCHAR(15), "PAReturnAc" NVARCHAR(15), "PurchOfsAc" NVARCHAR(15), "ShpdGdsAct" NVARCHAR(15), "VatRevAct" NVARCHAR(15), "StockValue" DECIMAL(21,6) CS_FIXED, "DecresGlAc" NVARCHAR(15), "IncresGlAc" NVARCHAR(15), "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 '31', "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), "NegStckAct" NVARCHAR(15), "StkInTnAct" NVARCHAR(15), "PurBalAct" NVARCHAR(15), "WhICenAct" NVARCHAR(15), "WhOCenAct" NVARCHAR(15), "WipOffset" NVARCHAR(15), "StockOffst" NVARCHAR(15), "DftBinAbs" INTEGER CS_INT, "DftBinEnfd" NVARCHAR(1) DEFAULT 'N', "Freezed" NVARCHAR(1) DEFAULT 'N', "FreezeDoc" INTEGER CS_INT, "FreeChrgSA" NVARCHAR(15), "FreeChrgPU" NVARCHAR(15), "IndEscala" NVARCHAR(1) DEFAULT 'Y', "CNJPMan" NVARCHAR(14), PRIMARY KEY ("ItemCode", "WhsCode", "logInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE CPBTREE INDEX "AITW_ITEM" ON "SBODEMOUS"."AITW" ( "ItemCode" ASC );
CREATE CPBTREE INDEX "AITW_WHS" ON "SBODEMOUS"."AITW" ( "WhsCode" ASC );
CREATE CPBTREE INDEX "AITW_COUNTED" ON "SBODEMOUS"."AITW" ( "WasCounted" ASC )