CREATE COLUMN TABLE "SBODEMOPT"."UWKO" ("OrderNum" INTEGER CS_INT DEFAULT 0 NOT NULL , "Status" NVARCHAR(1) DEFAULT 'O', "Canceled" NVARCHAR(1) DEFAULT 'N', "OrderDate" LONGDATE CS_LONGDATE, "ProdctDate" LONGDATE CS_LONGDATE, "ExpFinishD" LONGDATE CS_LONGDATE, "FinishDate" LONGDATE CS_LONGDATE, "FinishUser" NVARCHAR(8), "CardCode" NVARCHAR(15), "CustomName" NVARCHAR(100), "NumInCustm" NVARCHAR(16), "TotalOrder" DECIMAL(21,6) CS_FIXED, "TotalCurr" NVARCHAR(3), "DocTime" SMALLINT CS_INT, "Memo" NVARCHAR(254), "SerialNum" INTEGER CS_INT NOT NULL , "CntctCode" INTEGER CS_INT DEFAULT 0, "UpdateDate" LONGDATE CS_LONGDATE, "CreateDate" LONGDATE CS_LONGDATE, "Transfered" NVARCHAR(1) DEFAULT 'N', "Instance" SMALLINT CS_INT DEFAULT 0 NOT NULL , "Series" INTEGER CS_INT, "ActWorkCod" NVARCHAR(15), "ActWorkSum" DECIMAL(21,6) CS_FIXED, "JrnlMemo" NVARCHAR(254), "DataSource" NVARCHAR(1) DEFAULT 'N', "ObjType" NVARCHAR(20) DEFAULT '68', "UserSign" SMALLINT CS_INT, "PriceList" SMALLINT CS_INT DEFAULT 1, "FinncPriod" INTEGER CS_INT, "SysRate" DECIMAL(21,6) CS_FIXED, PRIMARY KEY ("OrderNum")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE UNIQUE INDEX "UWKO_SERIAL" ON "SBODEMOPT"."UWKO" ( "SerialNum" ASC, "Instance" ASC );
CREATE INDEX "UWKO_SERIES" ON "SBODEMOPT"."UWKO" ( "Series" ASC )