Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

collection of reusable code, programs, and database objects that provides common functionality across all E-Business products.

Object Type Identification

...

Code Block
languagebash
themeRDark
cp $SOURCE_FILE $XXHR_TOP/patch/115/sql/;
sqlplus $FDEBS_DB_USER/$FDEBS_DB_PASSWORD <<EOF
set define off
  @$XXHR_TOP/patch/115/sql/XXHR_BIPUB_REP_PKG.seq
.
SHOW ERRORS
exit sql.sqlcode
EOF

Example File

Tip
  • Make sure to end file with forward slash /, if last statement is FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY.
    • Since 4.6.0.4, FlexDeploy will automatically add / at the end of file if last statement is program block.
  • Simple statements can be delimited by ; at end of statement but FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY needs / after it no matter where it is added in SQL file.
    • Since 4.6.0.5, FlexDeploy automatically add / at the end of file if last statement is View, Insert, Update, Delete and does not end with ;.
  • Single or multiple line comments are also supported in input files.
  • See SQL File Considerations for more details.


Code Block
languagesql
themeRDark
DROP TABLE HR.DEPARTMENTS;

CREATE TABLE HR.DEPARTMENTS
(
     DEPARTMENT_ID NUMBER (4)  NOT NULL ,
     DEPARTMENT_NAME VARCHAR2 (30 BYTE)  NOT NULL ,
     MANAGER_ID NUMBER (6) ,
     LOCATION_ID NUMBER (4)
);

DROP SEQUENCE HR.DEPARTMENTS_SEQ;

CREATE SEQUENCE HR.DEPARTMENTS_SEQ
    INCREMENT BY 10
    MAXVALUE 9990
    MINVALUE 1
    NOCACHE;

CREATE OR REPLACE TRIGGER HR.ID_DEPARTMENTS
    BEFORE INSERT ON HR.DEPARTMENTS
    FOR EACH ROW
BEGIN
  SELECT HR.DEPARTMENTS_SEQ.NEXTVAL
  INTO   :new.DEPARTMENT_ID
  FROM   dual;
END ID_DEPARTMENTS;
/

...