CREATE COLUMN TABLE "SBODEMODE"."SOI5" ("WizardId" INTEGER CS_INT NOT NULL , "SOINum" INTEGER CS_INT NOT NULL , "DocType" INTEGER CS_INT NOT NULL , "DocEntry" INTEGER CS_INT NOT NULL , "SOILineNum" INTEGER CS_INT NOT NULL , "DocLineNum" INTEGER CS_INT NOT NULL , "ItemCode" NVARCHAR(50), "ItemName" NVARCHAR(200), "unitMsr" NVARCHAR(100), "Quantity" DECIMAL(21,6) CS_FIXED, "TotalFrgn" DECIMAL(21,6) CS_FIXED, "LineTotal" DECIMAL(21,6) CS_FIXED, "Currency" NVARCHAR(3), "Rate" DECIMAL(21,6) CS_FIXED, "BaseRate" DECIMAL(21,6) CS_FIXED, "BasNumAtCr" NVARCHAR(200), "BaseDocNum" INTEGER CS_INT, "BaseEntry" INTEGER CS_INT, "BasTaxDate" LONGDATE CS_LONGDATE, "FExcBasSum" DECIMAL(21,6) CS_FIXED, "AExcBasSum" DECIMAL(21,6) CS_FIXED, "ExciseUoM" INTEGER CS_INT, "ExcRateUoM" DECIMAL(21,6) CS_FIXED, "ExcRateAdV" DECIMAL(21,6) CS_FIXED, "ExciseSum" DECIMAL(21,6) CS_FIXED, "VatBaseSum" DECIMAL(21,6) CS_FIXED, "VatPrcnt" DECIMAL(21,6) CS_FIXED, "VatSum" DECIMAL(21,6) CS_FIXED, "TaxCtgr" NVARCHAR(6), "VatGroup" NVARCHAR(8), PRIMARY KEY ("WizardId", "SOINum", "DocType", "DocEntry", "DocLineNum")) UNLOAD PRIORITY 5  AUTO MERGE ;
CREATE UNIQUE INDEX "SOI5_SOILINENUM" ON "SBODEMODE"."SOI5" ( "WizardId" ASC, "SOINum" ASC, "SOILineNum" ASC )