CREATE COLUMN TABLE "SBODEMODE"."CSV13" ("DocEntry" INTEGER CS_INT NOT NULL , "LineNum" INTEGER CS_INT NOT NULL , "GroupNum" INTEGER CS_INT NOT NULL , "ExpnsCode" INTEGER CS_INT, "LineTotal" DECIMAL(21,6) CS_FIXED, "TotalFrgn" DECIMAL(21,6) CS_FIXED, "TotalSumSy" DECIMAL(21,6) CS_FIXED, "PaidToDate" DECIMAL(21,6) CS_FIXED, "PaidFC" DECIMAL(21,6) CS_FIXED, "PaidSys" DECIMAL(21,6) CS_FIXED, "ObjType" NVARCHAR(20) DEFAULT '166', "LogInstanc" INTEGER CS_INT DEFAULT 0, "TaxStatus" NVARCHAR(1) DEFAULT 'Y', "VatGroup" NVARCHAR(8), "VatPrcnt" DECIMAL(21,6) CS_FIXED, "VatSum" DECIMAL(21,6) CS_FIXED, "VatSumFrgn" DECIMAL(21,6) CS_FIXED, "VatSumSy" DECIMAL(21,6) CS_FIXED, "DedVatSum" DECIMAL(21,6) CS_FIXED, "DedVatSumF" DECIMAL(21,6) CS_FIXED, "DedVatSumS" DECIMAL(21,6) CS_FIXED, "IsAcquistn" NVARCHAR(1) DEFAULT 'N', "TaxCode" NVARCHAR(8), "TaxType" NVARCHAR(1) DEFAULT 'Y', "VatApplied" DECIMAL(21,6) CS_FIXED, "VatAppldFC" DECIMAL(21,6) CS_FIXED, "VatAppldSC" DECIMAL(21,6) CS_FIXED, "EquVatPer" DECIMAL(21,6) CS_FIXED, "EquVatSum" DECIMAL(21,6) CS_FIXED, "EquVatSumF" DECIMAL(21,6) CS_FIXED, "EquVatSumS" DECIMAL(21,6) CS_FIXED, "lineVat" DECIMAL(21,6) CS_FIXED, "lineVatlF" DECIMAL(21,6) CS_FIXED, "lineVatS" DECIMAL(21,6) CS_FIXED, "WtLiable" NVARCHAR(1), "BaseMethod" NVARCHAR(1), "Stock" NVARCHAR(1) DEFAULT 'N', "LstPchPrce" NVARCHAR(1), "AnalysRpt" NVARCHAR(1) DEFAULT 'N', "BaseAbsEnt" INTEGER CS_INT DEFAULT -1, "BaseType" INTEGER CS_INT, "BaseRef" INTEGER CS_INT, "BaseLnNum" INTEGER CS_INT, "TrgType" INTEGER CS_INT, "TrgAbsEnt" INTEGER CS_INT DEFAULT -1, "BaseGroup" INTEGER CS_INT DEFAULT -1, "Status" NVARCHAR(1) DEFAULT 'O', "TrgGroup" INTEGER CS_INT DEFAULT -1, "VisOrder" INTEGER CS_INT, "DistrbMthd" NVARCHAR(1), "DistribExp" NVARCHAR(1), "FixCurr" NVARCHAR(3), "VatDscntPr" DECIMAL(21,6) CS_FIXED, "OcrCode" NVARCHAR(8), "OcrCode2" NVARCHAR(8), "OcrCode3" NVARCHAR(8), "OcrCode4" NVARCHAR(8), "OcrCode5" NVARCHAR(8), "Project" NVARCHAR(20), "DocFreight" NVARCHAR(1), PRIMARY KEY ("DocEntry", "LineNum", "GroupNum")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "SBODEMODE"."CSV13" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$DocEntry$LineNum$','DocEntry','LineNum'));
CREATE INDEX "CSV13_LINE" ON "SBODEMODE"."CSV13" ( "DocEntry" ASC, "LineNum" ASC )