CREATE COLUMN TABLE "IMCYC"."OUSR" ("USERID" SMALLINT CS_INT NOT NULL , "PASSWORD" NVARCHAR(254) DEFAULT '0', "PASSWORD1" NVARCHAR(8), "PASSWORD2" NVARCHAR(8), "INTERNAL_K" SMALLINT CS_INT NOT NULL , "USER_CODE" NVARCHAR(25) NOT NULL , "U_NAME" NVARCHAR(155), "GROUPS" SMALLINT CS_INT DEFAULT 0, "PASSWORD4" NVARCHAR(254), "ALLOWENCES" NCLOB MEMORY THRESHOLD 1000, "SUPERUSER" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DISCOUNT" DECIMAL(21,6) CS_FIXED, "PASSWORD3" NVARCHAR(8), "Info1File" NVARCHAR(4), "Info1Field" SMALLINT CS_INT, "Info2File" NVARCHAR(4), "Info2Field" SMALLINT CS_INT, "Info3File" NVARCHAR(4), "Info3Field" SMALLINT CS_INT, "Info4File" NVARCHAR(4), "Info4Field" SMALLINT CS_INT, "dType" CHAR(1) CS_FIXEDSTRING DEFAULT 'H', "E_Mail" NVARCHAR(100), "PortNum" NVARCHAR(50), "OutOfOffic" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SendEMail" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SendSMS" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "DfltsGroup" NVARCHAR(8), "CashLimit" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "MaxCashSum" DECIMAL(21,6) CS_FIXED, "Fax" NVARCHAR(20), "SendFax" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Locked" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "Department" SMALLINT CS_INT DEFAULT -2, "Branch" SMALLINT CS_INT DEFAULT -2, "UserPrefs" BLOB MEMORY THRESHOLD 1000, "Language" INTEGER CS_INT, "Charset" SMALLINT CS_INT, "OpenCdt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CdtPrvDays" INTEGER CS_INT DEFAULT 1, "DsplyRates" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AuImpRates" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "OpenDps" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "RcrFlag" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CheckFiles" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "OpenCredit" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "CreditDay1" SMALLINT CS_INT DEFAULT 1, "CreditDay2" SMALLINT CS_INT DEFAULT 15, "WallPaper" NCLOB MEMORY THRESHOLD 1000, "WllPprDsp" SMALLINT CS_INT DEFAULT 1, "AdvImagePr" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "ContactLog" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "LastWarned" LONGDATE CS_LONGDATE, "AlertPolFr" SMALLINT CS_INT DEFAULT 5, "ScreenLock" SMALLINT CS_INT DEFAULT 30, "ShowNewMsg" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "Picture" NVARCHAR(200), "Position" NVARCHAR(90), "Address" NVARCHAR(100), "Country" NVARCHAR(3), "Tel1" NVARCHAR(20), "Tel2" NVARCHAR(20), "GENDER" CHAR(1) CS_FIXEDSTRING DEFAULT 'F', "Birthday" LONGDATE CS_LONGDATE, "EnbMenuFlt" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "objType" NVARCHAR(20) DEFAULT '12', "logInstanc" INTEGER CS_INT, "userSign" SMALLINT CS_INT, "createDate" LONGDATE CS_LONGDATE, "userSign2" SMALLINT CS_INT, "updateDate" LONGDATE CS_LONGDATE, "OneLogPwd" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "lastLogin" LONGDATE CS_LONGDATE, "LastPwds" NVARCHAR(254) DEFAULT '0', "LastPwds2" NVARCHAR(254) DEFAULT '0', "LastPwdSet" LONGDATE CS_LONGDATE, "FailedLog" INTEGER CS_INT DEFAULT 0, "PwdNeverEx" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SalesDisc" DECIMAL(21,6) CS_FIXED, "PurchDisc" DECIMAL(21,6) CS_FIXED, "LstLogoutD" LONGDATE CS_LONGDATE, "LstLoginT" INTEGER CS_INT, "LstLogoutT" INTEGER CS_INT, "LstPwdChT" INTEGER CS_INT, "LstPwdChB" NVARCHAR(8), "RclFlag" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "MobileUser" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "MobileIMEI" NVARCHAR(64), "PrsWkCntEb" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "SnapShotId" INTEGER CS_INT DEFAULT 0, "STData" NVARCHAR(40), "SupportUsr" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "NoSTPwdNum" SMALLINT CS_INT DEFAULT 0, "DomainUser" NVARCHAR(50), "CUSAgree" CHAR(1) CS_FIXEDSTRING, "EmailSig" NCLOB MEMORY THRESHOLD 1000, "TPLId" SMALLINT CS_INT, "DigCrtPath" NCLOB MEMORY THRESHOLD 1000, "ShowNewTsk" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "IntgrtEb" CHAR(1) CS_FIXEDSTRING DEFAULT 'N', "AllBrnchF" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', "EvtNotify" CHAR(1) CS_FIXEDSTRING DEFAULT 'Y', PRIMARY KEY ("USERID")) UNLOAD PRIORITY 0  AUTO MERGE ;
CREATE INDEX "OUSR_PASSWORD" ON "IMCYC"."OUSR" ( "PASSWORD" ASC );
CREATE UNIQUE INDEX "OUSR_USER_CODE" ON "IMCYC"."OUSR" ( "USER_CODE" ASC );
CREATE UNIQUE INDEX "OUSR_INTERNAL" ON "IMCYC"."OUSR" ( "INTERNAL_K" ASC )