CREATE COLUMN TABLE "SBODEMODE"."OHEM" ("empID" INTEGER CS_INT NOT NULL , "lastName" NVARCHAR(50), "firstName" NVARCHAR(50), "middleName" NVARCHAR(50), "sex" NVARCHAR(1) DEFAULT 'M', "jobTitle" NVARCHAR(20), "type" INTEGER CS_INT, "dept" SMALLINT CS_INT, "branch" SMALLINT CS_INT, "workStreet" NVARCHAR(100), "workBlock" NVARCHAR(100), "workZip" NVARCHAR(20), "workCity" NVARCHAR(100), "workCounty" NVARCHAR(100), "workCountr" NVARCHAR(3), "workState" NVARCHAR(3), "manager" INTEGER CS_INT, "userId" INTEGER CS_INT, "salesPrson" INTEGER CS_INT, "officeTel" NVARCHAR(50), "officeExt" NVARCHAR(50), "mobile" NVARCHAR(50), "pager" NVARCHAR(50), "homeTel" NVARCHAR(50), "fax" NVARCHAR(50), "email" NVARCHAR(100), "startDate" LONGDATE CS_LONGDATE, "status" INTEGER CS_INT, "salary" DECIMAL(21,6) CS_FIXED, "salaryUnit" NVARCHAR(1) DEFAULT 'M', "emplCost" DECIMAL(21,6) CS_FIXED, "empCostUnt" NVARCHAR(1) DEFAULT 'M', "termDate" LONGDATE CS_LONGDATE, "termReason" INTEGER CS_INT, "bankCode" NVARCHAR(30), "bankBranch" NVARCHAR(100), "bankBranNo" NVARCHAR(30), "bankAcount" NVARCHAR(100), "homeStreet" NVARCHAR(100), "homeBlock" NVARCHAR(100), "homeZip" NVARCHAR(20), "homeCity" NVARCHAR(100), "homeCounty" NVARCHAR(100), "homeCountr" NVARCHAR(3), "homeState" NVARCHAR(3), "birthDate" LONGDATE CS_LONGDATE, "brthCountr" NVARCHAR(3), "martStatus" NVARCHAR(1) DEFAULT 'S', "nChildren" SMALLINT CS_INT, "govID" NVARCHAR(64), "citizenshp" NVARCHAR(3), "passportNo" NVARCHAR(64), "passportEx" LONGDATE CS_LONGDATE, "picture" NVARCHAR(200), "remark" NCLOB MEMORY THRESHOLD 1000, "attachment" NCLOB MEMORY THRESHOLD 1000, "salaryCurr" NVARCHAR(3), "empCostCur" NVARCHAR(3), "WorkBuild" NCLOB MEMORY THRESHOLD 1000, "HomeBuild" NCLOB MEMORY THRESHOLD 1000, "position" INTEGER CS_INT, "AtcEntry" INTEGER CS_INT, "AddrTypeW" NVARCHAR(100), "AddrTypeH" NVARCHAR(100), "StreetNoW" NVARCHAR(100), "StreetNoH" NVARCHAR(100), "DispMidNam" NVARCHAR(1) DEFAULT 'N', "NamePos" NVARCHAR(1) DEFAULT '1', "DispComma" NVARCHAR(1) DEFAULT 'N', "CostCenter" NVARCHAR(8), "CompanyNum" NVARCHAR(20), "VacPreYear" INTEGER CS_INT, "VacCurYear" INTEGER CS_INT, "MunKey" NVARCHAR(20), "TaxClass" NVARCHAR(2) DEFAULT '0', "InTaxLiabi" NVARCHAR(2) DEFAULT '0', "EmTaxCCode" NVARCHAR(9) DEFAULT '0', "RelPartner" NVARCHAR(9) DEFAULT '0', "ExemptAmnt" DECIMAL(21,6) CS_FIXED, "ExemptUnit" NVARCHAR(20) DEFAULT '0', "AddiAmnt" DECIMAL(21,6) CS_FIXED, "AddiUnit" NVARCHAR(20) DEFAULT '0', "TaxOName" NVARCHAR(50), "TaxONum" NVARCHAR(20), "HeaInsName" NVARCHAR(50), "HeaInsCode" NVARCHAR(50), "HeaInsType" NVARCHAR(20) DEFAULT ' ', "SInsurNum" NVARCHAR(20), "StatusOfP" NVARCHAR(2) DEFAULT '-1', "StatusOfE" NVARCHAR(2) DEFAULT '0', "BCodeDateV" NVARCHAR(20), "DevBAOwner" NVARCHAR(1) DEFAULT 'N', "FNameSP" NVARCHAR(50), "SurnameSP" NVARCHAR(50), "LogInstanc" INTEGER CS_INT DEFAULT 0, "UserSign" SMALLINT CS_INT, "UserSign2" SMALLINT CS_INT, "UpdateDate" LONGDATE CS_LONGDATE, "PersGroup" NVARCHAR(5) DEFAULT '-1', "JTCode" NVARCHAR(5), "ExtEmpNo" NVARCHAR(20), "BirthPlace" NVARCHAR(100), "PymMeth" NVARCHAR(2) DEFAULT '05', "ExemptCurr" NVARCHAR(3), "AddiCurr" NVARCHAR(3), "STDCode" INTEGER CS_INT, "FatherName" NVARCHAR(150), "CPF" NVARCHAR(100), "CRC" NVARCHAR(20), "ContResp" NVARCHAR(1) DEFAULT 'N', "RepLegal" NVARCHAR(1) DEFAULT 'N', "DirfDeclar" NVARCHAR(1) DEFAULT 'N', "UF_CRC" NVARCHAR(3), "IDType" NVARCHAR(30), "Active" NVARCHAR(1) DEFAULT 'Y', "BPLId" INTEGER CS_INT, "ManualNUM" NVARCHAR(60), "PassIssue" LONGDATE CS_LONGDATE, "PassIssuer" NVARCHAR(254), "QualCode" NVARCHAR(3) DEFAULT '000', "PRWebAccss" NVARCHAR(1) DEFAULT 'N', "PrePRWeb" NVARCHAR(1) DEFAULT 'N', "BPLink" NVARCHAR(15), "NaturalPer" NVARCHAR(1) DEFAULT 'N', "DPPStatus" NVARCHAR(1) DEFAULT 'N', "EnRligion" NCLOB MEMORY THRESHOLD 1000, "EnRligionP" NCLOB MEMORY THRESHOLD 1000, "EncryptIV" NVARCHAR(100), "EnGovID" NCLOB MEMORY THRESHOLD 1000, "EnPassport" NCLOB MEMORY THRESHOLD 1000, "CreateDate" LONGDATE CS_LONGDATE, "CreateTS" INTEGER CS_INT, "UpdateTS" INTEGER CS_INT, "EnInsurNum" NCLOB MEMORY THRESHOLD 1000, "EnBnkAcct" NCLOB MEMORY THRESHOLD 1000, "Code" NVARCHAR(50), "ARetSEFAZ" NVARCHAR(1) DEFAULT 'N', "DataSource" NVARCHAR(1) DEFAULT 'N', "EnSex" NCLOB MEMORY THRESHOLD 1000, "SexEx" NVARCHAR(15) DEFAULT 'M', "EnSexEx" NCLOB MEMORY THRESHOLD 1000, PRIMARY KEY ("empID")) UNLOAD PRIORITY 0  AUTO MERGE ;
ALTER TABLE "SBODEMODE"."OHEM" WITH PARAMETERS ('CONCAT_ATTRIBUTE'=('$firstName$middleName$lastName$','firstName','middleName','lastName'));
CREATE INDEX "OHEM_OUSR" ON "SBODEMODE"."OHEM" ( "userId" ASC );
CREATE INDEX "OHEM_OSLP" ON "SBODEMODE"."OHEM" ( "salesPrson" ASC );
CREATE INDEX "OHEM_NAME" ON "SBODEMODE"."OHEM" ( "firstName" ASC, "middleName" ASC, "lastName" ASC )