CREATE COLUMN TABLE "IMCYC"."ORIN" ("DocEntry" INTEGER CS_INT NOT NULL , "DocNum" INTEGER CS_INT, "DocType" CHAR(1) CS_FIXEDSTRING DEFAULT 'I', "CANCELED" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Handwrtten" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Printed" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DocStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'O', "InvntSttus" CHAR(1) CS_FIXEDSTRING DEFAULT 'O', "Transfered" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ObjType" NVARCHAR(20) DEFAULT '14', "DocDate" LONGDATE CS_LONGDATE, "DocDueDate" LONGDATE CS_LONGDATE, "CardCode" NVARCHAR(15), "CardName" NVARCHAR(100), "Address" NVARCHAR(254), "NumAtCard" NVARCHAR(100), "VatPercent" DECIMAL(21,6) CS_FIXED, "VatSum" DECIMAL(21,6) CS_FIXED, "VatSumFC" DECIMAL(21,6) CS_FIXED, "DiscPrcnt" DECIMAL(21,6) CS_FIXED, "DiscSum" DECIMAL(21,6) CS_FIXED, "DiscSumFC" DECIMAL(21,6) CS_FIXED, "DocCur" NVARCHAR(3), "DocRate" DECIMAL(21,6) CS_FIXED, "DocTotal" DECIMAL(21,6) CS_FIXED, "DocTotalFC" DECIMAL(21,6) CS_FIXED, "PaidToDate" DECIMAL(21,6) CS_FIXED, "PaidFC" DECIMAL(21,6) CS_FIXED, "GrosProfit" DECIMAL(21,6) CS_FIXED, "GrosProfFC" DECIMAL(21,6) CS_FIXED, "Ref1" NVARCHAR(11), "Ref2" NVARCHAR(11), "Comments" NVARCHAR(254), "JrnlMemo" NVARCHAR(50), "TransId" INTEGER CS_INT, "ReceiptNum" INTEGER CS_INT, "GroupNum" SMALLINT CS_INT, "DocTime" SMALLINT CS_INT, "SlpCode" INTEGER CS_INT DEFAULT -1, "TrnspCode" SMALLINT CS_INT DEFAULT -1, "PartSupply" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "Confirmed" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "GrossBase" SMALLINT CS_INT DEFAULT 0, "ImportEnt" INTEGER CS_INT, "CreateTran" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SummryType" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "UpdInvnt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "UpdCardBal" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Instance" SMALLINT CS_INT DEFAULT 0, "Flags" INTEGER CS_INT DEFAULT 0, "InvntDirec" CHAR(1) CS_FIXEDSTRING DEFAULT 'X', "CntctCode" INTEGER CS_INT, "ShowSCN" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "FatherCard" NVARCHAR(15), "SysRate" DECIMAL(21,6) CS_FIXED, "CurSource" CHAR(1) CS_FIXEDSTRING DEFAULT 'C', "VatSumSy" DECIMAL(21,6) CS_FIXED, "DiscSumSy" DECIMAL(21,6) CS_FIXED, "DocTotalSy" DECIMAL(21,6) CS_FIXED, "PaidSys" DECIMAL(21,6) CS_FIXED, "FatherType" CHAR(1) CS_FIXEDSTRING DEFAULT 'P', "GrosProfSy" DECIMAL(21,6) CS_FIXED, "UpdateDate" LONGDATE CS_LONGDATE, "IsICT" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CreateDate" LONGDATE CS_LONGDATE, "Volume" DECIMAL(21,6) CS_FIXED, "VolUnit" SMALLINT CS_INT, "Weight" DECIMAL(21,6) CS_FIXED, "WeightUnit" SMALLINT CS_INT, "Series" SMALLINT CS_INT, "TaxDate" LONGDATE CS_LONGDATE, "Filler" NVARCHAR(8), "DataSource" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "StampNum" NVARCHAR(16), "isCrin" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "FinncPriod" INTEGER CS_INT, "UserSign" SMALLINT CS_INT, "selfInv" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "VatPaid" DECIMAL(21,6) CS_FIXED, "VatPaidFC" DECIMAL(21,6) CS_FIXED, "VatPaidSys" DECIMAL(21,6) CS_FIXED, "UserSign2" SMALLINT CS_INT, "WddStatus" CHAR(1) CS_FIXEDSTRING DEFAULT '-', "draftKey" INTEGER CS_INT DEFAULT -1, "TotalExpns" DECIMAL(21,6) CS_FIXED, "TotalExpFC" DECIMAL(21,6) CS_FIXED, "TotalExpSC" DECIMAL(21,6) CS_FIXED, "DunnLevel" INTEGER CS_INT, "Address2" NVARCHAR(254), "LogInstanc" INTEGER CS_INT DEFAULT 0, "Exported" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "StationID" INTEGER CS_INT, "Indicator" NVARCHAR(2), "NetProc" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AqcsTax" DECIMAL(21,6) CS_FIXED, "AqcsTaxFC" DECIMAL(21,6) CS_FIXED, "AqcsTaxSC" DECIMAL(21,6) CS_FIXED, "CashDiscPr" DECIMAL(21,6) CS_FIXED, "CashDiscnt" DECIMAL(21,6) CS_FIXED, "CashDiscFC" DECIMAL(21,6) CS_FIXED, "CashDiscSC" DECIMAL(21,6) CS_FIXED, "ShipToCode" NVARCHAR(50), "LicTradNum" NVARCHAR(32), "PaymentRef" NVARCHAR(27), "WTSum" DECIMAL(21,6) CS_FIXED, "WTSumFC" DECIMAL(21,6) CS_FIXED, "WTSumSC" DECIMAL(21,6) CS_FIXED, "RoundDif" DECIMAL(21,6) CS_FIXED, "RoundDifFC" DECIMAL(21,6) CS_FIXED, "RoundDifSy" DECIMAL(21,6) CS_FIXED, "CheckDigit" CHAR(1) CS_FIXEDSTRING, "Form1099" INTEGER CS_INT, "Box1099" NVARCHAR(20), "submitted" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "PoPrss" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Rounding" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "RevisionPo" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Segment" SMALLINT CS_INT DEFAULT 0, "ReqDate" LONGDATE CS_LONGDATE, "CancelDate" LONGDATE CS_LONGDATE, "PickStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Pick" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BlockDunn" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "PeyMethod" NVARCHAR(15), "PayBlock" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "PayBlckRef" INTEGER CS_INT, "MaxDscn" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Reserve" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Max1099" DECIMAL(21,6) CS_FIXED, "CntrlBnk" NVARCHAR(15), "PickRmrk" NVARCHAR(254), "ISRCodLine" NVARCHAR(53), "ExpAppl" DECIMAL(21,6) CS_FIXED, "ExpApplFC" DECIMAL(21,6) CS_FIXED, "ExpApplSC" DECIMAL(21,6) CS_FIXED, "Project" NVARCHAR(20), "DeferrTax" CHAR(1) CS_FIXEDSTRING, "LetterNum" NVARCHAR(20), "FromDate" LONGDATE CS_LONGDATE, "ToDate" LONGDATE CS_LONGDATE, "WTApplied" DECIMAL(21,6) CS_FIXED, "WTAppliedF" DECIMAL(21,6) CS_FIXED, "BoeReserev" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AgentCode" NVARCHAR(32), "WTAppliedS" DECIMAL(21,6) CS_FIXED, "EquVatSum" DECIMAL(21,6) CS_FIXED, "EquVatSumF" DECIMAL(21,6) CS_FIXED, "EquVatSumS" DECIMAL(21,6) CS_FIXED, "Installmnt" SMALLINT CS_INT DEFAULT 1, "VATFirst" CHAR(1) CS_FIXEDSTRING, "NnSbAmnt" DECIMAL(21,6) CS_FIXED, "NnSbAmntSC" DECIMAL(21,6) CS_FIXED, "NbSbAmntFC" DECIMAL(21,6) CS_FIXED, "ExepAmnt" DECIMAL(21,6) CS_FIXED, "ExepAmntSC" DECIMAL(21,6) CS_FIXED, "ExepAmntFC" DECIMAL(21,6) CS_FIXED, "VatDate" LONGDATE CS_LONGDATE, "CorrExt" NVARCHAR(25), "CorrInv" INTEGER CS_INT, "NCorrInv" INTEGER CS_INT, "CEECFlag" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BaseAmnt" DECIMAL(21,6) CS_FIXED, "BaseAmntSC" DECIMAL(21,6) CS_FIXED, "BaseAmntFC" DECIMAL(21,6) CS_FIXED, "CtlAccount" NVARCHAR(15), "BPLId" INTEGER CS_INT, "BPLName" NVARCHAR(100), "VATRegNum" NVARCHAR(32), "TxInvRptNo" NVARCHAR(10), "TxInvRptDt" LONGDATE CS_LONGDATE, "KVVATCode" NCLOB MEMORY THRESHOLD 1000, "WTDetails" NVARCHAR(100), "SumAbsId" INTEGER CS_INT DEFAULT -1, "SumRptDate" LONGDATE CS_LONGDATE, "PIndicator" NVARCHAR(10) DEFAULT ' ', "ManualNum" NVARCHAR(20), "UseShpdGd" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BaseVtAt" DECIMAL(21,6) CS_FIXED, "BaseVtAtSC" DECIMAL(21,6) CS_FIXED, "BaseVtAtFC" DECIMAL(21,6) CS_FIXED, "NnSbVAt" DECIMAL(21,6) CS_FIXED, "NnSbVAtSC" DECIMAL(21,6) CS_FIXED, "NbSbVAtFC" DECIMAL(21,6) CS_FIXED, "ExptVAt" DECIMAL(21,6) CS_FIXED, "ExptVAtSC" DECIMAL(21,6) CS_FIXED, "ExptVAtFC" DECIMAL(21,6) CS_FIXED, "LYPmtAt" DECIMAL(21,6) CS_FIXED, "LYPmtAtSC" DECIMAL(21,6) CS_FIXED, "LYPmtAtFC" DECIMAL(21,6) CS_FIXED, "ExpAnSum" DECIMAL(21,6) CS_FIXED, "ExpAnSys" DECIMAL(21,6) CS_FIXED, "ExpAnFrgn" DECIMAL(21,6) CS_FIXED, "DocSubType" NVARCHAR(2) DEFAULT '--', "DpmStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'O', "DpmAmnt" DECIMAL(21,6) CS_FIXED, "DpmAmntSC" DECIMAL(21,6) CS_FIXED, "DpmAmntFC" DECIMAL(21,6) CS_FIXED, "DpmDrawn" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DpmPrcnt" DECIMAL(21,6) CS_FIXED, "PaidSum" DECIMAL(21,6) CS_FIXED, "PaidSumFc" DECIMAL(21,6) CS_FIXED, "PaidSumSc" DECIMAL(21,6) CS_FIXED, "FolioPref" NVARCHAR(4), "FolioNum" INTEGER CS_INT, "DpmAppl" DECIMAL(21,6) CS_FIXED, "DpmApplFc" DECIMAL(21,6) CS_FIXED, "DpmApplSc" DECIMAL(21,6) CS_FIXED, "LPgFolioN" INTEGER CS_INT, "Header" NCLOB MEMORY THRESHOLD 1000, "Footer" NCLOB MEMORY THRESHOLD 1000, "Posted" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "OwnerCode" INTEGER CS_INT, "BPChCode" NVARCHAR(15), "BPChCntc" INTEGER CS_INT, "PayToCode" NVARCHAR(50), "IsPaytoBnk" CHAR(1) CS_FIXEDSTRING, "BnkCntry" NVARCHAR(3), "BankCode" NVARCHAR(30), "BnkAccount" NVARCHAR(50), "BnkBranch" NVARCHAR(50), "isIns" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "TrackNo" NVARCHAR(30), "VersionNum" NVARCHAR(11), "LangCode" INTEGER CS_INT, "BPNameOW" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BillToOW" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ShipToOW" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "RetInvoice" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ClsDate" LONGDATE CS_LONGDATE, "MInvNum" INTEGER CS_INT, "MInvDate" LONGDATE CS_LONGDATE, "SeqCode" SMALLINT CS_INT, "Serial" INTEGER CS_INT, "SeriesStr" NVARCHAR(3), "SubStr" NVARCHAR(3), "Model" NVARCHAR(6) DEFAULT '0', "TaxOnExp" DECIMAL(21,6) CS_FIXED, "TaxOnExpFc" DECIMAL(21,6) CS_FIXED, "TaxOnExpSc" DECIMAL(21,6) CS_FIXED, "TaxOnExAp" DECIMAL(21,6) CS_FIXED, "TaxOnExApF" DECIMAL(21,6) CS_FIXED, "TaxOnExApS" DECIMAL(21,6) CS_FIXED, "LastPmnTyp" CHAR(1) CS_FIXEDSTRING, "LndCstNum" INTEGER CS_INT, "UseCorrVat" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BlkCredMmo" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "OpenForLaC" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "Excised" CHAR(1) CS_FIXEDSTRING DEFAULT 'O', "ExcRefDate" LONGDATE CS_LONGDATE, "ExcRmvTime" NVARCHAR(8), "SrvGpPrcnt" DECIMAL(21,6) CS_FIXED, "DepositNum" INTEGER CS_INT, "CertNum" NVARCHAR(31), "DutyStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "AutoCrtFlw" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "FlwRefDate" LONGDATE CS_LONGDATE, "FlwRefNum" NVARCHAR(100), "VatJENum" INTEGER CS_INT DEFAULT -1, "DpmVat" DECIMAL(21,6) CS_FIXED, "DpmVatFc" DECIMAL(21,6) CS_FIXED, "DpmVatSc" DECIMAL(21,6) CS_FIXED, "DpmAppVat" DECIMAL(21,6) CS_FIXED, "DpmAppVatF" DECIMAL(21,6) CS_FIXED, "DpmAppVatS" DECIMAL(21,6) CS_FIXED, "InsurOp347" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "IgnRelDoc" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BuildDesc" NVARCHAR(50), "ResidenNum" CHAR(1) CS_FIXEDSTRING DEFAULT '1', "Checker" INTEGER CS_INT, "Payee" INTEGER CS_INT, "CopyNumber" INTEGER CS_INT DEFAULT 0, "SSIExmpt" CHAR(1) CS_FIXEDSTRING, "PQTGrpSer" SMALLINT CS_INT, "PQTGrpNum" INTEGER CS_INT, "PQTGrpHW" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ReopOriDoc" CHAR(1) CS_FIXEDSTRING, "ReopManCls" CHAR(1) CS_FIXEDSTRING, "DocManClsd" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ClosingOpt" SMALLINT CS_INT DEFAULT 1, "SpecDate" LONGDATE CS_LONGDATE, "Ordered" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "NTSApprov" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "NTSWebSite" SMALLINT CS_INT, "NTSeTaxNo" NVARCHAR(50), "NTSApprNo" NVARCHAR(50), "PayDuMonth" CHAR(1) CS_FIXEDSTRING, "ExtraMonth" SMALLINT CS_INT, "ExtraDays" SMALLINT CS_INT, "CdcOffset" SMALLINT CS_INT DEFAULT 0, "SignMsg" NCLOB MEMORY THRESHOLD 1000, "SignDigest" NCLOB MEMORY THRESHOLD 1000, "CertifNum" NVARCHAR(50), "KeyVersion" INTEGER CS_INT, "EDocGenTyp" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ESeries" SMALLINT CS_INT, "EDocNum" NVARCHAR(50), "EDocExpFrm" INTEGER CS_INT, "OnlineQuo" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "POSEqNum" NVARCHAR(20), "POSManufSN" NVARCHAR(20), "POSCashN" INTEGER CS_INT, "EDocStatus" CHAR(1) CS_FIXEDSTRING DEFAULT 'C', "EDocCntnt" NCLOB MEMORY THRESHOLD 1000, "EDocProces" CHAR(1) CS_FIXEDSTRING DEFAULT 'C', "EDocErrCod" NVARCHAR(50), "EDocErrMsg" NCLOB MEMORY THRESHOLD 1000, "EDocCancel" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "EDocTest" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "EDocPrefix" NVARCHAR(10), "CUP" INTEGER CS_INT, "CIG" INTEGER CS_INT, "DpmAsDscnt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Attachment" NCLOB MEMORY THRESHOLD 1000, "AtcEntry" INTEGER CS_INT, "SupplCode" NVARCHAR(254), "GTSRlvnt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "BaseDisc" DECIMAL(21,6) CS_FIXED, "BaseDiscSc" DECIMAL(21,6) CS_FIXED, "BaseDiscFc" DECIMAL(21,6) CS_FIXED, "BaseDiscPr" DECIMAL(21,6) CS_FIXED, "CreateTS" INTEGER CS_INT, "UpdateTS" INTEGER CS_INT, "SrvTaxRule" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AnnInvDecR" INTEGER CS_INT, "Supplier" NVARCHAR(15), "Releaser" INTEGER CS_INT, "Receiver" INTEGER CS_INT, "ToWhsCode" NVARCHAR(8), "AssetDate" LONGDATE CS_LONGDATE, "Requester" NVARCHAR(25), "ReqName" NVARCHAR(155), "Branch" SMALLINT CS_INT, "Department" SMALLINT CS_INT, "Email" NVARCHAR(100), "Notify" CHAR(1) CS_FIXEDSTRING, "ReqType" INTEGER CS_INT DEFAULT 12, "OriginType" CHAR(1) CS_FIXEDSTRING DEFAULT 'M', "IsReuseNum" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "IsReuseNFN" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DocDlvry" CHAR(1) CS_FIXEDSTRING, "PaidDpm" DECIMAL(21,6) CS_FIXED, "PaidDpmF" DECIMAL(21,6) CS_FIXED, "PaidDpmS" DECIMAL(21,6) CS_FIXED, "EnvTypeNFe" INTEGER CS_INT DEFAULT -1, "AgrNo" INTEGER CS_INT, "IsAlt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AltBaseTyp" INTEGER CS_INT DEFAULT -1, "AltBaseEnt" INTEGER CS_INT, "AuthCode" NVARCHAR(250), "StDlvDate" LONGDATE CS_LONGDATE, "StDlvTime" INTEGER CS_INT, "EndDlvDate" LONGDATE CS_LONGDATE, "EndDlvTime" INTEGER CS_INT, "VclPlate" NVARCHAR(20), "ElCoStatus" NVARCHAR(10), "AtDocType" NVARCHAR(2), "ElCoMsg" NVARCHAR(254), "PrintSEPA" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "FreeChrg" DECIMAL(21,6) CS_FIXED, "FreeChrgFC" DECIMAL(21,6) CS_FIXED, "FreeChrgSC" DECIMAL(21,6) CS_FIXED, "NfeValue" DECIMAL(21,6) CS_FIXED, "FiscDocNum" NVARCHAR(100), "RelatedTyp" INTEGER CS_INT DEFAULT -1, "RelatedEnt" INTEGER CS_INT, "CCDEntry" INTEGER CS_INT, "NfePrntFo" INTEGER CS_INT DEFAULT 0, "ZrdAbs" INTEGER CS_INT, "POSRcptNo" INTEGER CS_INT, "FoCTax" DECIMAL(21,6) CS_FIXED, "FoCTaxFC" DECIMAL(21,6) CS_FIXED, "FoCTaxSC" DECIMAL(21,6) CS_FIXED, "TpCusPres" INTEGER CS_INT, "ExcDocDate" LONGDATE CS_LONGDATE, "FoCFrght" DECIMAL(21,6) CS_FIXED, "FoCFrghtFC" DECIMAL(21,6) CS_FIXED, "FoCFrghtSC" DECIMAL(21,6) CS_FIXED, "InterimTyp" SMALLINT CS_INT DEFAULT 0, "PTICode" NVARCHAR(5), "Letter" CHAR(1) CS_FIXEDSTRING, "FolNumFrom" INTEGER CS_INT, "FolNumTo" INTEGER CS_INT, "FolSeries" INTEGER CS_INT, "SplitTax" DECIMAL(21,6) CS_FIXED, "SplitTaxFC" DECIMAL(21,6) CS_FIXED, "SplitTaxSC" DECIMAL(21,6) CS_FIXED, "ToBinCode" NVARCHAR(228), "PermitNo" NVARCHAR(20), "MYFtype" NVARCHAR(2), "PoDropPrss" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DocTaxID" NVARCHAR(32), "DateReport" LONGDATE CS_LONGDATE, "RepSection" NVARCHAR(3), "ExclTaxRep" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "PosCashReg" INTEGER CS_INT, "DmpTransID" NVARCHAR(20), "ECommerBP" NVARCHAR(15), "EComerGSTN" NVARCHAR(15), "Revision" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "RevRefNo" NVARCHAR(100), "RevRefDate" LONGDATE CS_LONGDATE, "RevCreRefN" NVARCHAR(100), "RevCreRefD" LONGDATE CS_LONGDATE, "TaxInvNo" NVARCHAR(100), "FrmBpDate" LONGDATE CS_LONGDATE, "GSTTranTyp" NVARCHAR(2), "BaseType" INTEGER CS_INT DEFAULT -1, "BaseEntry" INTEGER CS_INT, "ComTrade" CHAR(1) CS_FIXEDSTRING DEFAULT 'E', "ComTradeRt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "UseBilAddr" CHAR(1) CS_FIXEDSTRING, "SplitPmnt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "IssReason" SMALLINT CS_INT DEFAULT 1, "U_UDF_UIID" NVARCHAR(36), "U_FormaPago" NVARCHAR(10), "U_NoCuenta" NVARCHAR(15), "U_Emitido" NVARCHAR(30), "U_TotalReal" INTEGER CS_INT, "U_TIPO_OPERACION" NVARCHAR(10) DEFAULT '85', "U_TIPO_TERCERO" NVARCHAR(10), "U_Comp_Ventas" NVARCHAR(10) NOT NULL , "U_B1SYS_Confirm" NVARCHAR(5), "U_B1SYS_MainUsage" NVARCHAR(20), "U_U_FormaPago_2" NVARCHAR(3), "U_METPAG" NVARCHAR(3), "U_TipoRelacion" NVARCHAR(3), PRIMARY KEY ("DocEntry")) UNLOAD PRIORITY 5  AUTO MERGE ;
ALTER TABLE "IMCYC"."ORIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$NumAtCard$CardCode$','NumAtCard','CardCode'));
ALTER TABLE "IMCYC"."ORIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$DocNum$Instance$Segment$DocSubType$PIndicator$','DocNum','Instance','Segment','DocSubType','PIndicator'));
ALTER TABLE "IMCYC"."ORIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$DocStatus$CANCELED$','DocStatus','CANCELED'));
ALTER TABLE "IMCYC"."ORIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$FatherCard$FatherType$','FatherCard','FatherType'));
ALTER TABLE "IMCYC"."ORIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$DocDate$PIndicator$','DocDate','PIndicator'));
ALTER TABLE "IMCYC"."ORIN" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$ESeries$EDocNum$','ESeries','EDocNum'));
CREATE INDEX "ORIN_AT_CARD" ON "IMCYC"."ORIN" ( "NumAtCard" ASC, "CardCode" ASC );
CREATE INDEX "ORIN_CUSTOMER" ON "IMCYC"."ORIN" ( "CardCode" ASC );
CREATE INDEX "ORIN_NUM" ON "IMCYC"."ORIN" ( "DocNum" ASC, "Instance" ASC, "Segment" ASC, "DocSubType" ASC, "PIndicator" ASC );
CREATE INDEX "ORIN_DOC_STATUS" ON "IMCYC"."ORIN" ( "DocStatus" ASC, "CANCELED" ASC );
CREATE INDEX "ORIN_FTHR_CARD" ON "IMCYC"."ORIN" ( "FatherCard" ASC, "FatherType" ASC );
CREATE INDEX "ORIN_SERIES" ON "IMCYC"."ORIN" ( "Series" ASC );
CREATE INDEX "ORIN_OWNER_CODE" ON "IMCYC"."ORIN" ( "OwnerCode" ASC );
CREATE INDEX "ORIN_DATE_PIND" ON "IMCYC"."ORIN" ( "DocDate" ASC, "PIndicator" ASC );
CREATE INDEX "ORIN_ESERIES" ON "IMCYC"."ORIN" ( "ESeries" ASC, "EDocNum" ASC );
CREATE INDEX "ORIN_FOL_SERIES" ON "IMCYC"."ORIN" ( "FolSeries" ASC )