CREATE COLUMN TABLE "IMCYC"."UITM" ("ItemCode" NVARCHAR(50) NOT NULL , "ItemName" NVARCHAR(100), "FrgnName" NVARCHAR(100), "ItmsGrpCod" SMALLINT CS_INT DEFAULT 100, "CstGrpCode" SMALLINT CS_INT DEFAULT -1, "VatGourpSa" NVARCHAR(8), "CodeBars" NVARCHAR(254), "VATLiable" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "PrchseItem" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "SellItem" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "InvntItem" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "OnHand" DECIMAL(21,6) CS_FIXED, "IsCommited" DECIMAL(21,6) CS_FIXED, "OnOrder" DECIMAL(21,6) CS_FIXED, "IncomeAcct" NVARCHAR(15), "ExmptIncom" NVARCHAR(15), "MaxLevel" DECIMAL(21,6) CS_FIXED, "DfltWH" NVARCHAR(8), "CardCode" NVARCHAR(15), "SuppCatNum" NVARCHAR(50), "BuyUnitMsr" NVARCHAR(100), "NumInBuy" DECIMAL(21,6) CS_FIXED, "ReorderQty" DECIMAL(21,6) CS_FIXED, "MinLevel" DECIMAL(21,6) CS_FIXED, "LstEvlPric" DECIMAL(21,6) CS_FIXED, "LstEvlDate" LONGDATE CS_LONGDATE, "CustomPer" DECIMAL(21,6) CS_FIXED, "Canceled" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "MnufctTime" INTEGER CS_INT, "WholSlsTax" CHAR(1) CS_FIXEDSTRING, "RetilrTax" CHAR(1) CS_FIXEDSTRING, "SpcialDisc" DECIMAL(21,6) CS_FIXED, "DscountCod" SMALLINT CS_INT, "TrackSales" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SalUnitMsr" NVARCHAR(100), "NumInSale" DECIMAL(21,6) CS_FIXED, "Consig" DECIMAL(21,6) CS_FIXED, "QueryGroup" INTEGER CS_INT DEFAULT 0, "Counted" DECIMAL(21,6) CS_FIXED, "OpenBlnc" DECIMAL(21,6) CS_FIXED, "EvalSystem" CHAR(1) CS_FIXEDSTRING, "UserSign" SMALLINT CS_INT, "FREE" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "PicturName" NVARCHAR(200), "Transfered" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BlncTrnsfr" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "UserText" NCLOB MEMORY THRESHOLD 1000, "SerialNum" NVARCHAR(17), "CommisPcnt" DECIMAL(21,6) CS_FIXED, "CommisSum" DECIMAL(21,6) CS_FIXED, "CommisGrp" SMALLINT CS_INT DEFAULT 0, "TreeType" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "TreeQty" DECIMAL(21,6) CS_FIXED, "LastPurPrc" DECIMAL(21,6) CS_FIXED, "LastPurCur" NVARCHAR(3), "LastPurDat" LONGDATE CS_LONGDATE, "ExitCur" NVARCHAR(3), "ExitPrice" DECIMAL(21,6) CS_FIXED, "ExitWH" NVARCHAR(8), "AssetItem" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "WasCounted" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ManSerNum" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SHeight1" DECIMAL(21,6) CS_FIXED, "SHght1Unit" SMALLINT CS_INT, "SHeight2" DECIMAL(21,6) CS_FIXED, "SHght2Unit" SMALLINT CS_INT, "SWidth1" DECIMAL(21,6) CS_FIXED, "SWdth1Unit" SMALLINT CS_INT, "SWidth2" DECIMAL(21,6) CS_FIXED, "SWdth2Unit" SMALLINT CS_INT, "SLength1" DECIMAL(21,6) CS_FIXED, "SLen1Unit" SMALLINT CS_INT, "Slength2" DECIMAL(21,6) CS_FIXED, "SLen2Unit" SMALLINT CS_INT, "SVolume" DECIMAL(21,6) CS_FIXED, "SVolUnit" SMALLINT CS_INT, "SWeight1" DECIMAL(21,6) CS_FIXED, "SWght1Unit" SMALLINT CS_INT, "SWeight2" DECIMAL(21,6) CS_FIXED, "SWght2Unit" SMALLINT CS_INT, "BHeight1" DECIMAL(21,6) CS_FIXED, "BHght1Unit" SMALLINT CS_INT, "BHeight2" DECIMAL(21,6) CS_FIXED, "BHght2Unit" SMALLINT CS_INT, "BWidth1" DECIMAL(21,6) CS_FIXED, "BWdth1Unit" SMALLINT CS_INT, "BWidth2" DECIMAL(21,6) CS_FIXED, "BWdth2Unit" SMALLINT CS_INT, "BLength1" DECIMAL(21,6) CS_FIXED, "BLen1Unit" SMALLINT CS_INT, "Blength2" DECIMAL(21,6) CS_FIXED, "BLen2Unit" SMALLINT CS_INT, "BVolume" DECIMAL(21,6) CS_FIXED, "BVolUnit" SMALLINT CS_INT, "BWeight1" DECIMAL(21,6) CS_FIXED, "BWght1Unit" SMALLINT CS_INT, "BWeight2" DECIMAL(21,6) CS_FIXED, "BWght2Unit" SMALLINT CS_INT, "FixCurrCms" NVARCHAR(3), "FirmCode" SMALLINT CS_INT DEFAULT -1, "LstSalDate" LONGDATE CS_LONGDATE, "QryGroup1" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup2" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup3" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup4" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup5" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup6" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup7" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup8" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup9" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup10" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup11" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup12" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup13" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup14" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup15" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup16" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup17" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup18" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup19" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup20" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup21" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup22" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup23" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup24" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup25" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup26" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup27" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup28" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup29" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup30" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup31" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup32" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup33" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup34" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup35" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup36" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup37" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup38" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup39" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup40" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup41" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup42" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup43" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup44" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup45" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup46" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup47" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup48" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup49" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup50" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup51" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup52" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup53" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup54" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup55" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup56" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup57" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup58" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup59" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup60" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup61" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup62" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup63" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "QryGroup64" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CreateDate" LONGDATE CS_LONGDATE, "UpdateDate" LONGDATE CS_LONGDATE, "ExportCode" NVARCHAR(20), "SalFactor1" DECIMAL(21,6) CS_FIXED, "SalFactor2" DECIMAL(21,6) CS_FIXED, "SalFactor3" DECIMAL(21,6) CS_FIXED, "SalFactor4" DECIMAL(21,6) CS_FIXED, "PurFactor1" DECIMAL(21,6) CS_FIXED, "PurFactor2" DECIMAL(21,6) CS_FIXED, "PurFactor3" DECIMAL(21,6) CS_FIXED, "PurFactor4" DECIMAL(21,6) CS_FIXED, "SalFormula" NVARCHAR(40), "PurFormula" NVARCHAR(40), "VatGroupPu" NVARCHAR(8), "AvgPrice" DECIMAL(21,6) CS_FIXED, "PurPackMsr" NVARCHAR(30), "PurPackUn" DECIMAL(21,6) CS_FIXED, "SalPackMsr" NVARCHAR(30), "SalPackUn" DECIMAL(21,6) CS_FIXED, "SCNCounter" SMALLINT CS_INT, "ManBtchNum" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ManOutOnly" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DataSource" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "validFor" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "validFrom" LONGDATE CS_LONGDATE, "validTo" LONGDATE CS_LONGDATE, "frozenFor" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "frozenFrom" LONGDATE CS_LONGDATE, "frozenTo" LONGDATE CS_LONGDATE, "BlockOut" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "ValidComm" NVARCHAR(30), "FrozenComm" NVARCHAR(30), "LogInstanc" INTEGER CS_INT DEFAULT 0, "ObjType" NVARCHAR(20) DEFAULT '4', "SWW" NVARCHAR(16), "Deleted" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DocEntry" INTEGER CS_INT, "ExpensAcct" NVARCHAR(15), "FrgnInAcct" NVARCHAR(15), "ShipType" SMALLINT CS_INT, "GLMethod" CHAR(1) CS_FIXEDSTRING DEFAULT 'W', "ECInAcct" NVARCHAR(15), "FrgnExpAcc" NVARCHAR(15), "ECExpAcc" NVARCHAR(15), "TaxType" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "ByWh" CHAR(1) CS_FIXEDSTRING, "WTLiable" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "ItemType" CHAR(1) CS_FIXEDSTRING DEFAULT 'I', "WarrntTmpl" NVARCHAR(20), "BaseUnit" NVARCHAR(20), "CountryOrg" NVARCHAR(3), "StockValue" DECIMAL(21,6) CS_FIXED, "Phantom" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "IssueMthd" CHAR(1) CS_FIXEDSTRING, "FREE1" CHAR(1) CS_FIXEDSTRING, "PricingPrc" DECIMAL(21,6) CS_FIXED, "MngMethod" CHAR(1) CS_FIXEDSTRING DEFAULT 'R', "ReorderPnt" DECIMAL(21,6) CS_FIXED, "InvntryUom" NVARCHAR(100), "PlaningSys" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "PrcrmntMtd" CHAR(1) CS_FIXEDSTRING DEFAULT 'B', "OrdrIntrvl" SMALLINT CS_INT, "OrdrMulti" DECIMAL(21,6) CS_FIXED, "MinOrdrQty" DECIMAL(21,6) CS_FIXED, "LeadTime" INTEGER CS_INT, "IndirctTax" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "TaxCodeAR" NVARCHAR(8), "TaxCodeAP" NVARCHAR(8), "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', "ServiceCtg" INTEGER CS_INT DEFAULT -1, "ItemClass" CHAR(1) CS_FIXEDSTRING DEFAULT '2', "Excisable" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ChapterID" INTEGER CS_INT DEFAULT -1, "NotifyASN" NVARCHAR(40), "ProAssNum" NVARCHAR(20), "AssblValue" DECIMAL(21,6) CS_FIXED, "DNFEntry" INTEGER CS_INT DEFAULT -1, "UserSign2" SMALLINT CS_INT, "Spec" NVARCHAR(30), "TaxCtg" NVARCHAR(4), "Series" SMALLINT CS_INT, "Number" INTEGER CS_INT, "FuelCode" INTEGER CS_INT DEFAULT -1, "BeverTblC" NVARCHAR(2), "BeverGrpC" NVARCHAR(2), "BeverTM" INTEGER CS_INT DEFAULT -1, "Attachment" NCLOB MEMORY THRESHOLD 1000, "AtcEntry" INTEGER CS_INT, "ToleranDay" INTEGER CS_INT, "UgpEntry" INTEGER CS_INT, "PUoMEntry" INTEGER CS_INT, "SUoMEntry" INTEGER CS_INT, "IUoMEntry" INTEGER CS_INT, "IssuePriBy" SMALLINT CS_INT, "AssetClass" NVARCHAR(20), "AssetGroup" NVARCHAR(15), "InventryNo" NVARCHAR(12), "Technician" INTEGER CS_INT, "Employee" INTEGER CS_INT, "Location" INTEGER CS_INT, "StatAsset" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Cession" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DeacAftUL" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AsstStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CapDate" LONGDATE CS_LONGDATE, "AcqDate" LONGDATE CS_LONGDATE, "RetDate" LONGDATE CS_LONGDATE, "GLPickMeth" CHAR(1) CS_FIXEDSTRING DEFAULT 'A', "NoDiscount" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "MgrByQty" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AssetRmk1" NVARCHAR(100), "AssetRmk2" NVARCHAR(100), "AssetAmnt1" DECIMAL(21,6) CS_FIXED, "AssetAmnt2" DECIMAL(21,6) CS_FIXED, "DeprGroup" NVARCHAR(15), "AssetSerNo" NVARCHAR(32), "CntUnitMsr" NVARCHAR(100), "NumInCnt" DECIMAL(21,6) CS_FIXED, "INUoMEntry" INTEGER CS_INT, "OneBOneRec" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "RuleCode" NVARCHAR(2), "ScsCode" NVARCHAR(10), "SpProdType" NVARCHAR(2), "IWeight1" DECIMAL(21,6) CS_FIXED, "IWght1Unit" SMALLINT CS_INT, "IWeight2" DECIMAL(21,6) CS_FIXED, "IWght2Unit" SMALLINT CS_INT, "CompoWH" CHAR(1) CS_FIXEDSTRING DEFAULT 'B', "CreateTS" INTEGER CS_INT, "UpdateTS" INTEGER CS_INT, "VirtAstItm" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SouVirAsst" NVARCHAR(50), "InCostRoll" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "PrdStdCst" DECIMAL(21,6) CS_FIXED, "EnAstSeri" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "LinkRsc" NVARCHAR(50), "OnHldPert" DECIMAL(21,6) CS_FIXED, "onHldLimt" DECIMAL(21,6) CS_FIXED, "GSTRelevnt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SACEntry" INTEGER CS_INT DEFAULT -1, "GstTaxCtg" CHAR(1) CS_FIXEDSTRING DEFAULT 'R', "AssVal4WTR" DECIMAL(21,6) CS_FIXED, "ExcImpQUoM" INTEGER CS_INT, "ExcFixAmnt" DECIMAL(21,6) CS_FIXED, "ExcRate" DECIMAL(21,6) CS_FIXED, PRIMARY KEY ("ItemCode")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE INDEX "UITM_ITEM_NAME" ON "IMCYC"."UITM" ( "ItemName" ASC );
CREATE INDEX "UITM_TREE_TYPE" ON "IMCYC"."UITM" ( "TreeType" ASC );
CREATE INDEX "UITM_COM_GROUP" ON "IMCYC"."UITM" ( "CommisGrp" ASC );
CREATE INDEX "UITM_SALE" ON "IMCYC"."UITM" ( "SellItem" ASC );
CREATE INDEX "UITM_PURCHASE" ON "IMCYC"."UITM" ( "PrchseItem" ASC );
CREATE INDEX "UITM_INVENTORY" ON "IMCYC"."UITM" ( "InvntItem" ASC )