Maximo Script
Maximo Script
Maximo Script
(
ROWSTAMP VARCHAR2(40) NOT NULL,
DFLTGROUP VARCHAR2(20) NOT NULL,
GROUPVALUE VARCHAR2(20) NOT NULL,
GLDEFAULT VARCHAR2(32),
OLDGLDEFAULT VARCHAR2(32)
)
TABLESPACE MAXIMO_TBS
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 200K
NEXT 200K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 10
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
CREATE TABLE MR
(
ROWSTAMP VARCHAR2(40) NOT NULL,
MRNUM VARCHAR2(8) NOT NULL,
TYPE VARCHAR2(10) NOT NULL,
DESCRIPTION VARCHAR2(50),
STATUS VARCHAR2(8) NOT NULL,
STATUSDATE DATE NOT NULL,
CHANGEDATE DATE NOT NULL,
CHANGEBY VARCHAR2(18) NOT NULL,
PRIORITY INTEGER NOT NULL,
REQUESTEDBY VARCHAR2(18),
PHONE VARCHAR2(20),
MRDATE DATE NOT NULL,
REQUIREDDATE DATE,
SHIPTO VARCHAR2(8),
DROPPOINT VARCHAR2(12),
TOTALCOST NUMBER(10,2) NOT NULL,
WONUM VARCHAR2(10),
EQNUM VARCHAR2(13),
LOCATION VARCHAR2(13),
GLDEBITACCT VARCHAR2(32),
HISTORYFLAG VARCHAR2(1) NOT NULL,
ENTERDATE DATE NOT NULL,
ENTERBY VARCHAR2(18) NOT NULL,
WFID INTEGER,
WFACTIVE VARCHAR2(1) NOT NULL,
LDKEY INTEGER,
MRSTATUSSEQ INTEGER,
MR1 VARCHAR2(1),
MR2 VARCHAR2(1),
MR3 VARCHAR2(1),
MR4 VARCHAR2(1),
MR5 VARCHAR2(1),
MR6 VARCHAR2(1),
MR7 VARCHAR2(1),
MR8 VARCHAR2(1),
MR9 VARCHAR2(1),
MR10 VARCHAR2(1),
MRLA1 VARCHAR2(10),
MRLA2 VARCHAR2(10),
MRLA3 VARCHAR2(10),
MRLA4 VARCHAR2(10),
MRLA5 VARCHAR2(10),
PCARDNUM VARCHAR2(30),
PCARDTYPE VARCHAR2(2),
PCARDEXPDATE VARCHAR2(4)
)
TABLESPACE MAXIMO_TBS
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 200K
NEXT 200K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 10
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
CREATE TABLE PM
(
ROWSTAMP VARCHAR2(40) NOT NULL,
PMNUM VARCHAR2(10) NOT NULL,
DESCRIPTION VARCHAR2(50),
EQNUM VARCHAR2(13),
FIRSTDATE DATE,
LASTCOMPDATE DATE,
LASTSTARTDATE DATE,
USETARGETDATE VARCHAR2(1) NOT NULL,
LASTMETERREADING NUMBER(15,2) NOT NULL,
LASTMETERDATE DATE,
FREQUENCY INTEGER NOT NULL,
METERFREQUENCY NUMBER(15,2) NOT NULL,
PMCOUNTER INTEGER NOT NULL,
PRIORITY INTEGER NOT NULL,
WORKTYPE VARCHAR2(5),
JPNUM VARCHAR2(10),
JPSEQINUSE VARCHAR2(1) NOT NULL,
NEXTDATE DATE,
PM17 VARCHAR2(10),
PM18 NUMBER(15,2),
CHANGEDATE DATE NOT NULL,
CHANGEBY VARCHAR2(18) NOT NULL,
PMEQ1 VARCHAR2(10),
PM1 VARCHAR2(10),
PM2 VARCHAR2(10),
PM3 VARCHAR2(10),
PM4 DATE,
PM5 NUMBER(15,2),
LDKEY INTEGER,
SUPERVISOR VARCHAR2(8),
CALENDAR VARCHAR2(8),
CREWID VARCHAR2(8),
INTERRUPTABLE VARCHAR2(1),
DOWNTIME VARCHAR2(1),
PM6 VARCHAR2(10),
PM7 VARCHAR2(10),
PM8 VARCHAR2(10),
PM9 NUMBER(10,2),
PM10 VARCHAR2(10),
PMEQ2 DATE,
PMEQ3 NUMBER(15,2),
PMJP1 VARCHAR2(10),
PMJP2 VARCHAR2(10),
PMJP3 VARCHAR2(10),
PMJP4 NUMBER(10,2),
PMJP5 DATE,
GLACCOUNT VARCHAR2(32),
LOCATION VARCHAR2(13),
STORELOC VARCHAR2(13),
PARENT VARCHAR2(10),
HASCHILDREN VARCHAR2(1) NOT NULL,
WOSEQUENCE INTEGER,
USEFREQUENCY VARCHAR2(1) NOT NULL,
ROUTE VARCHAR2(8),
FREQUNIT VARCHAR2(8) NOT NULL,
METERFREQUENCY2 NUMBER(15,2) NOT NULL,
LASTMETERREADING2 NUMBER(15,2) NOT NULL,
LASTMETERDATE2 DATE,
LEADTIME INTEGER,
EXTDATE DATE,
ADJNEXTDUE VARCHAR2(1),
PM11 VARCHAR2(10),
PM12 VARCHAR2(10),
PM13 VARCHAR2(10),
PM14 NUMBER(10,2),
PM15 INTEGER,
PM16 VARCHAR2(1),
MASTERPM VARCHAR2(10),
OVERRIDEMASTERUPD VARCHAR2(1) NOT NULL,
ISMASTERPM VARCHAR2(1) NOT NULL,
MASTERPMITEMNUM VARCHAR2(8),
APPLYMASTERPMTOEQ VARCHAR2(1) NOT NULL,
APPLYMASTERPMTOLOC VARCHAR2(1) NOT NULL,
UPDTIMEBASEDFREQ VARCHAR2(1) NOT NULL,
UPDSTARTDATE VARCHAR2(1) NOT NULL,
UPDMETER1 VARCHAR2(1) NOT NULL,
UPDMETER2 VARCHAR2(1) NOT NULL,
UPDJPSEQUENCE VARCHAR2(1) NOT NULL,
UPDEXTDATE VARCHAR2(1) NOT NULL,
UPDSEASONALDATES VARCHAR2(1) NOT NULL,
WOSTATUS VARCHAR2(8) NOT NULL,
SEASONSTARTDAY INTEGER,
SEASONSTARTMONTH VARCHAR2(16),
SEASONENDDAY INTEGER,
SEASONENDMONTH VARCHAR2(16),
PMJP6 VARCHAR2(10),
PMJP7 VARCHAR2(10),
PMJP8 VARCHAR2(10),
PMJP9 NUMBER(10,2),
PMJP10 DATE,
DUEDATE DATE
)
TABLESPACE MAXIMO_TBS
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 200K
NEXT 220K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 10
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
CREATE TABLE PO
(
PONUM VARCHAR2(8) NOT NULL,
DESCRIPTION VARCHAR2(50),
PURCHASEAGENT VARCHAR2(50),
ORDERDATE DATE,
REQUIREDDATE DATE,
FOLLOWUPDATE DATE,
POTYPE VARCHAR2(6),
ORIGINALPONUM VARCHAR2(8),
STATUS VARCHAR2(6) NOT NULL,
STATUSDATE DATE NOT NULL,
VENDOR VARCHAR2(8),
CONTACT VARCHAR2(50),
FREIGHTTERMS VARCHAR2(50),
PAYMENTTERMS VARCHAR2(20),
SHIPVIA VARCHAR2(20),
CUSTOMERNUM VARCHAR2(16),
FOB VARCHAR2(20),
SHIPTO VARCHAR2(8),
SHIPTOATTN VARCHAR2(50),
BILLTO VARCHAR2(8),
BILLTOATTN VARCHAR2(50),
TOTALCOST NUMBER(10,2),
CHANGEBY VARCHAR2(18) NOT NULL,
CHANGEDATE DATE NOT NULL,
PRIORITY NUMBER NOT NULL,
HISTORYFLAG VARCHAR2(1) NOT NULL,
PO1 VARCHAR2(10),
PO2 VARCHAR2(10),
PO3 VARCHAR2(10),
PO4 VARCHAR2(10),
PO5 VARCHAR2(10),
PO6 NUMBER(10,2),
PO7 DATE,
PO8 NUMBER(15,2),
PO9 NUMBER,
PO10 VARCHAR2(1),
LDKEY NUMBER,
VENDELIVERYDATE DATE,
RECEIPTS VARCHAR2(20),
CURRENCYCODE VARCHAR2(8) NOT NULL,
EXCHANGERATE NUMBER(14,7),
EXCHANGEDATE DATE,
BUYAHEAD VARCHAR2(1) NOT NULL,
TOTALTAX1 NUMBER(10,2),
TOTALTAX2 NUMBER(10,2),
TOTALTAX3 NUMBER(10,2),
INCLUSIVE1 VARCHAR2(1) NOT NULL,
INCLUSIVE2 VARCHAR2(1) NOT NULL,
INCLUSIVE3 VARCHAR2(1) NOT NULL,
INTERNAL VARCHAR2(1) NOT NULL,
TOTALTAX4 NUMBER(10,2),
TOTALTAX5 NUMBER(10,2),
INCLUSIVE4 VARCHAR2(1) NOT NULL,
INCLUSIVE5 VARCHAR2(1) NOT NULL,
STARTDATE DATE,
ENDDATE DATE,
PAYONRECEIPT VARCHAR2(1) NOT NULL,
WFID NUMBER,
WFACTIVE VARCHAR2(1) NOT NULL,
BUYERCOMPANY VARCHAR2(8),
EXCHANGERATE2 NUMBER(14,7),
MNETSENT VARCHAR2(12),
ECOMERROR VARCHAR2(254),
ECOMSTATUSDATE DATE,
SOURCESYSID VARCHAR2(10),
OWNERSYSID VARCHAR2(10),
EXTERNALREFID VARCHAR2(10),
ROWSTAMP VARCHAR2(40) NOT NULL
)
TABLESPACE MAXIMO_TBS
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 200K
NEXT 200K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 10
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
CREATE TABLE PR
(
PRNUM VARCHAR2(8) NOT NULL,
ISSUEDATE DATE,
REQUIREDDATE DATE,
REQUESTEDBY VARCHAR2(18),
VENDOR VARCHAR2(8),
CONTACT VARCHAR2(50),
CUSTOMERNUM VARCHAR2(16),
FOB VARCHAR2(20),
FREIGHTTERMS VARCHAR2(50),
SHIPVIA VARCHAR2(20),
PAYMENTTERMS VARCHAR2(20),
SHIPTO VARCHAR2(8),
SHIPTOATTN VARCHAR2(50),
BILLTO VARCHAR2(8),
BILLTOATTN VARCHAR2(50),
DESCRIPTION VARCHAR2(50),
STATUS VARCHAR2(6) NOT NULL,
STATUSDATE DATE NOT NULL,
CHANGEDATE DATE NOT NULL,
CHANGEBY VARCHAR2(18) NOT NULL,
TOTALCOST NUMBER(10,2) NOT NULL,
PRIORITY NUMBER NOT NULL,
HISTORYFLAG VARCHAR2(1) NOT NULL,
PR1 VARCHAR2(10),
PR2 VARCHAR2(10),
PR3 VARCHAR2(10),
PR4 VARCHAR2(10),
PR5 VARCHAR2(10),
PR6 NUMBER(10,2),
PR7 DATE,
PR8 NUMBER(15,2),
PR9 NUMBER,
PR10 VARCHAR2(1),
LDKEY NUMBER,
SUPERVISOR VARCHAR2(8),
CURRENCYCODE VARCHAR2(8) NOT NULL,
EXCHANGERATE NUMBER(14,7),
EXCHANGEDATE DATE,
BUYAHEAD VARCHAR2(1) NOT NULL,
TOTALTAX1 NUMBER(10,2),
TOTALTAX2 NUMBER(10,2),
TOTALTAX3 NUMBER(10,2),
INCLUSIVE1 VARCHAR2(1) NOT NULL,
INCLUSIVE2 VARCHAR2(1) NOT NULL,
INCLUSIVE3 VARCHAR2(1) NOT NULL,
INTERNAL VARCHAR2(1) NOT NULL,
TOTALTAX4 NUMBER(10,2),
TOTALTAX5 NUMBER(10,2),
INCLUSIVE4 VARCHAR2(1) NOT NULL,
INCLUSIVE5 VARCHAR2(1) NOT NULL,
PAYONRECEIPT VARCHAR2(1) NOT NULL,
WFID NUMBER,
WFACTIVE VARCHAR2(1) NOT NULL,
EXCHANGERATE2 NUMBER(14,7),
SOURCESYSID VARCHAR2(10),
OWNERSYSID VARCHAR2(10),
EXTERNALREFID VARCHAR2(10),
PRLA1 VARCHAR2(10),
PRLA2 VARCHAR2(10),
PRLA3 VARCHAR2(10),
PRLA4 VARCHAR2(10),
PRLA5 VARCHAR2(10),
PCARDNUM VARCHAR2(30),
PCARDTYPE VARCHAR2(2),
PCARDEXPDATE VARCHAR2(4),
ROWSTAMP VARCHAR2(40) NOT NULL
)
TABLESPACE MAXIMO_TBS
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 200K
NEXT 200K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 10
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
LOGGING
NOCACHE
NOPARALLEL;
CREATE OR REPLACE TRIGGER RFQ_T BEFORE INSERT OR UPDATE ON RFQ FOR EACH
ROW
DECLARE NEXTVAL INTEGER; BEGIN SELECT MAXSEQ.NEXTVAL INTO NEXTVAL FROM
DUAL; :NEW.ROWSTAMP := NEXTVAL; END;
/
SHOW ERRORS;
CREATE OR REPLACE TRIGGER TAX_T BEFORE INSERT OR UPDATE ON TAX FOR EACH
ROW
DECLARE NEXTVAL INTEGER; BEGIN SELECT MAXSEQ.NEXTVAL INTO NEXTVAL FROM
DUAL; :NEW.ROWSTAMP := NEXTVAL; END;
/
SHOW ERRORS;
BEGIN