CREATE COLUMN TABLE "IMCYC"."OINS" ("insID" INTEGER CS_INT NOT NULL , "customer" NVARCHAR(15), "custmrName" NVARCHAR(100), "contactCod" INTEGER CS_INT, "directCsmr" NVARCHAR(15), "drctCsmNam" NVARCHAR(100), "manufSN" NVARCHAR(36), "internalSN" NVARCHAR(36), "warranty" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "wrrntyStrt" LONGDATE CS_LONGDATE, "wrrntyEnd" LONGDATE CS_LONGDATE, "responsVal" SMALLINT CS_INT, "responsUnt" CHAR(1) CS_FIXEDSTRING DEFAULT 'D', "itemCode" NVARCHAR(50), "itemName" NVARCHAR(100), "itemGroup" SMALLINT CS_INT, "manufDate" LONGDATE CS_LONGDATE, "delivery" INTEGER CS_INT, "deliveryNo" INTEGER CS_INT, "invoice" INTEGER CS_INT, "invoiceNum" INTEGER CS_INT, "dlvryDate" LONGDATE CS_LONGDATE, "cntctPhone" NVARCHAR(20), "street" NVARCHAR(100), "block" NVARCHAR(100), "zip" NVARCHAR(20), "city" NVARCHAR(100), "county" NVARCHAR(100), "country" NVARCHAR(3), "state" NVARCHAR(3), "instLction" NVARCHAR(254), "contract" INTEGER CS_INT, "cntrctStrt" LONGDATE CS_LONGDATE, "cntrctEnd" LONGDATE CS_LONGDATE, "attachment" NCLOB MEMORY THRESHOLD 1000, "objType" NVARCHAR(20) DEFAULT '176', "logInstanc" INTEGER CS_INT, "userSign" SMALLINT CS_INT, "createDate" LONGDATE CS_LONGDATE, "userSign2" SMALLINT CS_INT, "updateDate" LONGDATE CS_LONGDATE, "Building" NCLOB MEMORY THRESHOLD 1000, "status" CHAR(1) CS_FIXEDSTRING DEFAULT 'A', "replcIns" INTEGER CS_INT, "repByIns" INTEGER CS_INT, "technician" INTEGER CS_INT, "territory" INTEGER CS_INT, "AtcEntry" INTEGER CS_INT, "Transfered" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AddrType" NVARCHAR(100), "Instance" SMALLINT CS_INT DEFAULT 0, "StreetNo" NVARCHAR(100), "BPType" CHAR(1) CS_FIXEDSTRING DEFAULT 'R', "OwnerCode" INTEGER CS_INT, PRIMARY KEY ("insID")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "IMCYC"."OINS" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$customer$itemCode$internalSN$status$','customer','itemCode','internalSN','status'));
ALTER TABLE "IMCYC"."OINS" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$itemCode$manufSN$','itemCode','manufSN'));
ALTER TABLE "IMCYC"."OINS" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$itemCode$internalSN$','itemCode','internalSN'));
CREATE INDEX "OINS_C_ITM_SN_S" ON "IMCYC"."OINS" ( "customer" ASC, "itemCode" ASC, "internalSN" ASC, "status" ASC );
CREATE INDEX "OINS_ITM_MNFSN" ON "IMCYC"."OINS" ( "itemCode" ASC, "manufSN" ASC );
CREATE INDEX "OINS_ITM_INTSN" ON "IMCYC"."OINS" ( "itemCode" ASC, "internalSN" ASC )