CREATE COLUMN TABLE "IMCYC"."IGN4" ("DocEntry" INTEGER CS_INT NOT NULL , "LineNum" INTEGER CS_INT DEFAULT -1, "GroupNum" INTEGER CS_INT DEFAULT -1, "ExpnsCode" INTEGER CS_INT DEFAULT -1, "RelateType" INTEGER CS_INT DEFAULT 1, "StcCode" NVARCHAR(8), "StaCode" NVARCHAR(8), "staType" INTEGER CS_INT, "TaxRate" DECIMAL(21,6) CS_FIXED, "TaxAcct" NVARCHAR(15), "TaxSum" DECIMAL(21,6) CS_FIXED, "TaxSumFrgn" DECIMAL(21,6) CS_FIXED, "TaxSumSys" DECIMAL(21,6) CS_FIXED, "BaseSum" DECIMAL(21,6) CS_FIXED, "BaseSumFrg" DECIMAL(21,6) CS_FIXED, "BaseSumSys" DECIMAL(21,6) CS_FIXED, "ObjectType" NVARCHAR(20) DEFAULT '13', "LogInstanc" INTEGER CS_INT DEFAULT 0, "TaxStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "VatApplied" DECIMAL(21,6) CS_FIXED, "VatAppldFC" DECIMAL(21,6) CS_FIXED, "VatAppldSC" DECIMAL(21,6) CS_FIXED, "LineSeq" INTEGER CS_INT NOT NULL , "DeferrAcct" NVARCHAR(15), "BaseType" INTEGER CS_INT DEFAULT -1, "BaseAbs" INTEGER CS_INT DEFAULT -1, "BaseSeq" INTEGER CS_INT, "DeductTax" DECIMAL(21,6) CS_FIXED, "DdctTaxFrg" DECIMAL(21,6) CS_FIXED, "DdctTaxSys" DECIMAL(21,6) CS_FIXED, "BaseAppld" DECIMAL(21,6) CS_FIXED, "BaseApldFC" DECIMAL(21,6) CS_FIXED, "BaseApldSC" DECIMAL(21,6) CS_FIXED, "NonDdctPrc" DECIMAL(21,6) CS_FIXED, "NonDdctAct" NVARCHAR(15), "TaxInPrice" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Exempt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "TaxExpAct" NVARCHAR(15), "OnHoldTax" DECIMAL(21,6) CS_FIXED, "OnHoldTaxF" DECIMAL(21,6) CS_FIXED, "OnHoldTaxS" DECIMAL(21,6) CS_FIXED, "InGrossRev" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "TaxSumOrg" DECIMAL(21,6) CS_FIXED, "TaxSumOrgF" DECIMAL(21,6) CS_FIXED, "TaxSumOrgS" DECIMAL(21,6) CS_FIXED, "OpenTax" DECIMAL(21,6) CS_FIXED, "OpenTaxFC" DECIMAL(21,6) CS_FIXED, "OpenTaxSC" DECIMAL(21,6) CS_FIXED, "Unencumbrd" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "TaxOnRI" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "RvsChrgPrc" DECIMAL(21,6) CS_FIXED, "RvsChrgTax" DECIMAL(21,6) CS_FIXED, "RvsChrgSC" DECIMAL(21,6) CS_FIXED, "RvsChrgFC" DECIMAL(21,6) CS_FIXED, PRIMARY KEY INVERTED VALUE ("DocEntry", "LineSeq")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "IMCYC"."IGN4" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$DocEntry$LineNum$GroupNum$ExpnsCode$StcCode$StaCode$staType$','DocEntry','LineNum','GroupNum','ExpnsCode','StcCode','StaCode','staType'));
CREATE INDEX "IGN4_SCONDARY" ON "IMCYC"."IGN4" ( "DocEntry" ASC, "LineNum" ASC, "GroupNum" ASC, "ExpnsCode" ASC, "StcCode" ASC, "StaCode" ASC, "staType" ASC )