CREATE COLUMN TABLE "IMCYC"."OITW" ("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" CHAR(1) CS_FIXEDSTRING 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" CHAR(1) CS_FIXEDSTRING 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, "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" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Freezed" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "FreezeDoc" INTEGER CS_INT, "FreeChrgSA" NVARCHAR(15), "FreeChrgPU" NVARCHAR(15), PRIMARY KEY INVERTED VALUE ("ItemCode", "WhsCode")) UNLOAD PRIORITY 0  AUTO MERGE ;
CREATE INDEX "OITW_WHS" ON "IMCYC"."OITW" ( "WhsCode" ASC );
CREATE INDEX "OITW_DFT_BIN" ON "IMCYC"."OITW" ( "DftBinAbs" ASC )