CREATE COLUMN TABLE "IMCYC"."UWOR1" ("DocEntry" INTEGER CS_INT NOT NULL , "LineNum" INTEGER CS_INT NOT NULL , "ItemCode" NVARCHAR(50), "BaseQty" DECIMAL(21,6) CS_FIXED, "PlannedQty" DECIMAL(21,6) CS_FIXED, "IssuedQty" DECIMAL(21,6) CS_FIXED, "IssueType" CHAR(1) CS_FIXEDSTRING, "wareHouse" NVARCHAR(8), "VisOrder" INTEGER CS_INT, "WipActCode" NVARCHAR(15), "CompTotal" DECIMAL(21,6) CS_FIXED, "OcrCode" NVARCHAR(8), "OcrCode2" NVARCHAR(8), "OcrCode3" NVARCHAR(8), "OcrCode4" NVARCHAR(8), "OcrCode5" NVARCHAR(8), "LocCode" INTEGER CS_INT, "LogInstanc" INTEGER CS_INT DEFAULT 0, "LoadFrBOM" SMALLINT CS_INT DEFAULT 0, "Project" NVARCHAR(20), "UomEntry" INTEGER CS_INT DEFAULT 0, "UomCode" NVARCHAR(20), "ItemType" INTEGER CS_INT DEFAULT 4, "AdditQty" DECIMAL(21,6) CS_FIXED, "LineText" NCLOB MEMORY THRESHOLD 1000, "PickStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "PickQty" DECIMAL(21,6) CS_FIXED, "PickIdNo" INTEGER CS_INT, "ReleaseQty" DECIMAL(21,6) CS_FIXED, "ResAlloc" CHAR(1) CS_FIXEDSTRING, "StartDate" LONGDATE CS_LONGDATE, "EndDate" LONGDATE CS_LONGDATE, PRIMARY KEY INVERTED VALUE ("DocEntry", "LineNum")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "IMCYC"."UWOR1" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$ItemCode$wareHouse$','ItemCode','wareHouse'));
CREATE INDEX "UWOR1_ITEM_WHS" ON "IMCYC"."UWOR1" ( "ItemCode" ASC, "wareHouse" ASC )