CREATE COLUMN TABLE "SBODEMODE"."ARSC" ("ResCode" NVARCHAR(50) NOT NULL , "VisResCode" NVARCHAR(50), "Series" INTEGER CS_INT, "Number" INTEGER CS_INT, "CodeBars" NVARCHAR(254), "ResName" NVARCHAR(200), "FrgnName" NVARCHAR(200), "ResType" NVARCHAR(1) DEFAULT 'M', "ResGrpCod" SMALLINT CS_INT DEFAULT 1, "UnitOfMsr" NVARCHAR(100), "PrchseRes" NVARCHAR(1) DEFAULT 'Y', "SellRes" NVARCHAR(1) DEFAULT 'Y', "ProdRes" NVARCHAR(1) DEFAULT 'Y', "CardCode" NVARCHAR(15), "NoDiscount" NVARCHAR(1) DEFAULT 'N', "IssueMthd" NVARCHAR(1) DEFAULT 'B', "StdCost1" DECIMAL(21,6) CS_FIXED, "StdCost2" DECIMAL(21,6) CS_FIXED, "StdCost3" DECIMAL(21,6) CS_FIXED, "StdCost4" DECIMAL(21,6) CS_FIXED, "StdCost5" DECIMAL(21,6) CS_FIXED, "StdCost6" DECIMAL(21,6) CS_FIXED, "StdCost7" DECIMAL(21,6) CS_FIXED, "StdCost8" DECIMAL(21,6) CS_FIXED, "StdCost9" DECIMAL(21,6) CS_FIXED, "StdCost10" DECIMAL(21,6) CS_FIXED, "validFor" NVARCHAR(1) DEFAULT 'N', "validFrom" LONGDATE CS_LONGDATE, "validTo" LONGDATE CS_LONGDATE, "frozenFor" NVARCHAR(1) DEFAULT 'N', "frozenFrom" LONGDATE CS_LONGDATE, "frozenTo" LONGDATE CS_LONGDATE, "DfltWH" NVARCHAR(8), "QueryGroup" INTEGER CS_INT DEFAULT 0, "PicturName" NVARCHAR(200), "UserText" NCLOB MEMORY THRESHOLD 1000, "QryGroup1" NVARCHAR(1) DEFAULT 'N', "QryGroup2" NVARCHAR(1) DEFAULT 'N', "QryGroup3" NVARCHAR(1) DEFAULT 'N', "QryGroup4" NVARCHAR(1) DEFAULT 'N', "QryGroup5" NVARCHAR(1) DEFAULT 'N', "QryGroup6" NVARCHAR(1) DEFAULT 'N', "QryGroup7" NVARCHAR(1) DEFAULT 'N', "QryGroup8" NVARCHAR(1) DEFAULT 'N', "QryGroup9" NVARCHAR(1) DEFAULT 'N', "QryGroup10" NVARCHAR(1) DEFAULT 'N', "QryGroup11" NVARCHAR(1) DEFAULT 'N', "QryGroup12" NVARCHAR(1) DEFAULT 'N', "QryGroup13" NVARCHAR(1) DEFAULT 'N', "QryGroup14" NVARCHAR(1) DEFAULT 'N', "QryGroup15" NVARCHAR(1) DEFAULT 'N', "QryGroup16" NVARCHAR(1) DEFAULT 'N', "QryGroup17" NVARCHAR(1) DEFAULT 'N', "QryGroup18" NVARCHAR(1) DEFAULT 'N', "QryGroup19" NVARCHAR(1) DEFAULT 'N', "QryGroup20" NVARCHAR(1) DEFAULT 'N', "QryGroup21" NVARCHAR(1) DEFAULT 'N', "QryGroup22" NVARCHAR(1) DEFAULT 'N', "QryGroup23" NVARCHAR(1) DEFAULT 'N', "QryGroup24" NVARCHAR(1) DEFAULT 'N', "QryGroup25" NVARCHAR(1) DEFAULT 'N', "QryGroup26" NVARCHAR(1) DEFAULT 'N', "QryGroup27" NVARCHAR(1) DEFAULT 'N', "QryGroup28" NVARCHAR(1) DEFAULT 'N', "QryGroup29" NVARCHAR(1) DEFAULT 'N', "QryGroup30" NVARCHAR(1) DEFAULT 'N', "QryGroup31" NVARCHAR(1) DEFAULT 'N', "QryGroup32" NVARCHAR(1) DEFAULT 'N', "QryGroup33" NVARCHAR(1) DEFAULT 'N', "QryGroup34" NVARCHAR(1) DEFAULT 'N', "QryGroup35" NVARCHAR(1) DEFAULT 'N', "QryGroup36" NVARCHAR(1) DEFAULT 'N', "QryGroup37" NVARCHAR(1) DEFAULT 'N', "QryGroup38" NVARCHAR(1) DEFAULT 'N', "QryGroup39" NVARCHAR(1) DEFAULT 'N', "QryGroup40" NVARCHAR(1) DEFAULT 'N', "QryGroup41" NVARCHAR(1) DEFAULT 'N', "QryGroup42" NVARCHAR(1) DEFAULT 'N', "QryGroup43" NVARCHAR(1) DEFAULT 'N', "QryGroup44" NVARCHAR(1) DEFAULT 'N', "QryGroup45" NVARCHAR(1) DEFAULT 'N', "QryGroup46" NVARCHAR(1) DEFAULT 'N', "QryGroup47" NVARCHAR(1) DEFAULT 'N', "QryGroup48" NVARCHAR(1) DEFAULT 'N', "QryGroup49" NVARCHAR(1) DEFAULT 'N', "QryGroup50" NVARCHAR(1) DEFAULT 'N', "QryGroup51" NVARCHAR(1) DEFAULT 'N', "QryGroup52" NVARCHAR(1) DEFAULT 'N', "QryGroup53" NVARCHAR(1) DEFAULT 'N', "QryGroup54" NVARCHAR(1) DEFAULT 'N', "QryGroup55" NVARCHAR(1) DEFAULT 'N', "QryGroup56" NVARCHAR(1) DEFAULT 'N', "QryGroup57" NVARCHAR(1) DEFAULT 'N', "QryGroup58" NVARCHAR(1) DEFAULT 'N', "QryGroup59" NVARCHAR(1) DEFAULT 'N', "QryGroup60" NVARCHAR(1) DEFAULT 'N', "QryGroup61" NVARCHAR(1) DEFAULT 'N', "QryGroup62" NVARCHAR(1) DEFAULT 'N', "QryGroup63" NVARCHAR(1) DEFAULT 'N', "QryGroup64" NVARCHAR(1) DEFAULT 'N', "CreateDate" LONGDATE CS_LONGDATE, "UpdateDate" LONGDATE CS_LONGDATE, "DataSource" NVARCHAR(1) DEFAULT 'N', "ValidComm" NVARCHAR(30), "FrozenComm" NVARCHAR(30), "LogInstanc" INTEGER CS_INT DEFAULT 0 NOT NULL , "ObjType" NVARCHAR(20) DEFAULT '290', "Deleted" NVARCHAR(1) DEFAULT 'N', "UserSign2" SMALLINT CS_INT, "Attachment" NCLOB MEMORY THRESHOLD 1000, "AtcEntry" INTEGER CS_INT, "LastPurPrc" DECIMAL(21,6) CS_FIXED, "LastPurCur" NVARCHAR(3), "LastPurDat" LONGDATE CS_LONGDATE, "LstEvlPric" DECIMAL(21,6) CS_FIXED, "LstEvlDate" LONGDATE CS_LONGDATE, "NumResUnit" INTEGER CS_INT DEFAULT 1, "TimeResUn" INTEGER CS_INT, "ResAlloc" NVARCHAR(1) DEFAULT 'S', "LinkItm" NVARCHAR(50), "RelCap1" NVARCHAR(1) DEFAULT 'Y', "RelCap2" NVARCHAR(1) DEFAULT 'Y', "RelCap3" NVARCHAR(1) DEFAULT 'Y', "RelCap4" NVARCHAR(1) DEFAULT 'Y', "UserSign" SMALLINT CS_INT, PRIMARY KEY ("ResCode", "LogInstanc")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE INDEX "ARSC_ITEM_NAME" ON "SBODEMODE"."ARSC" ( "ResName" ASC );
CREATE INDEX "ARSC_SALE" ON "SBODEMODE"."ARSC" ( "PrchseRes" ASC );
CREATE INDEX "ARSC_PURCHASE" ON "SBODEMODE"."ARSC" ( "SellRes" ASC );
CREATE INDEX "ARSC_PRODUCTION" ON "SBODEMODE"."ARSC" ( "ProdRes" ASC )