DBA Data[Home] [Help]

APPS.IGS_AS_APPR_GRD_SCH_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 20

    x_last_update_date                  IN     DATE        DEFAULT NULL,
    x_last_updated_by                   IN     NUMBER      DEFAULT NULL,
    x_last_update_login                 IN     NUMBER      DEFAULT NULL
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 27-DEC-2001
  ||  Purpose : Initialises the Old and New references for the columns of the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */

    CURSOR cur_old_ref_values IS
      SELECT   *
      FROM     igs_as_appr_grd_sch
      WHERE    rowid = x_rowid;
Line: 47

    IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
      CLOSE cur_old_ref_values;
Line: 49

      fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
Line: 65

    IF (p_action = 'UPDATE') THEN
      new_references.creation_date                   := old_references.creation_date;
Line: 73

    new_references.last_update_date                  := x_last_update_date;
Line: 74

    new_references.last_updated_by                   := x_last_updated_by;
Line: 75

    new_references.last_update_login                 := x_last_update_login;
Line: 98

      fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
Line: 112

      fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
Line: 126

      fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
Line: 146

    SELECT COUNT(ai.assessment_type)
    FROM   igs_ps_unitass_item uai,
           igs_as_assessmnt_itm ai,
           igs_ps_unit_ofr_opt uoo
    WHERE  uai.ass_id = ai.ass_id AND
           uai.uoo_id = uoo.uoo_id AND
           uoo.unit_cd = old_references.unit_cd AND
           uoo.version_number = old_references.version_number AND
           ai.assessment_type = old_references.assessment_type AND
           uai.grading_schema_cd = old_references.grading_schema_cd AND
           uai.gs_version_number = old_references.gs_version_number AND
           uai.logical_delete_dt IS NULL;
Line: 159

    SELECT COUNT(ai.assessment_type)
    FROM   igs_as_unitass_item uai,
           igs_as_assessmnt_itm ai
    WHERE  uai.ass_id = ai.ass_id AND
           uai.unit_cd = old_references.unit_cd AND
           uai.version_number = old_references.version_number AND
           ai.assessment_type = old_references.assessment_type AND
           uai.grading_schema_cd = old_references.grading_schema_cd AND
           uai.gs_version_number = old_references.gs_version_number AND
           uai.logical_delete_dt IS NULL;
Line: 212

      SELECT   rowid
      FROM     igs_as_appr_grd_sch
      WHERE    assessment_type = x_assessment_type
      AND      grading_schema_cd = x_grading_schema_cd
      AND      gs_version_number = x_gs_version_number
      AND      unit_cd = x_unit_cd
      AND      version_number = x_version_number
      FOR UPDATE NOWAIT;
Line: 251

      SELECT   rowid
      FROM     igs_as_appr_grd_sch
      WHERE   ((assessment_type = x_assessment_type));
Line: 287

      SELECT   rowid
      FROM     igs_as_appr_grd_sch
      WHERE   ((unit_cd = x_unit_cd) AND
               (version_number = x_version_number));
Line: 324

      SELECT   rowid
      FROM     igs_as_appr_grd_sch
      WHERE   ((grading_schema_cd = x_grading_schema_cd) AND
               (gs_version_number = x_version_number));
Line: 358

    x_last_update_date                  IN     DATE        DEFAULT NULL,
    x_last_updated_by                   IN     NUMBER      DEFAULT NULL,
    x_last_update_login                 IN     NUMBER      DEFAULT NULL
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 27-DEC-2001
  ||  Purpose : Initialises the columns, Checks Constraints, Calls the
  ||            Trigger Handlers for the table, before any DML operation.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */
  BEGIN

    set_column_values (
      p_action,
      x_rowid,
      x_unit_cd,
      x_version_number,
      x_assessment_type,
      x_grading_schema_cd,
      x_gs_version_number,
      x_default_ind,
      x_closed_ind,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 391

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to Before Insert.
      IF ( get_pk_for_validation(
             new_references.assessment_type,
             new_references.grading_schema_cd,
             new_references.gs_version_number,
             new_references.unit_cd,
             new_references.version_number
           )
         ) THEN
        fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
Line: 406

    ELSIF (p_action = 'DELETE') THEN
      check_child_existence;
Line: 408

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to Before Update.
      check_parent_existance;
Line: 411

    ELSIF (p_action = 'VALIDATE_INSERT') THEN
      -- Call all the procedures related to Before Insert.
      IF ( get_pk_for_validation (
             new_references.assessment_type,
             new_references.grading_schema_cd,
             new_references.gs_version_number,
             new_references.unit_cd,
             new_references.version_number
           )
         ) THEN
        fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
Line: 425

    ELSIF (p_action = 'VALIDATE_DELETE') THEN
      check_child_existence;
Line: 432

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_unit_cd                           IN     VARCHAR2,
    x_version_number                    IN     NUMBER,
    x_assessment_type                   IN     VARCHAR2,
    x_grading_schema_cd                 IN     VARCHAR2,
    x_gs_version_number                 IN     NUMBER,
    x_default_ind                       IN     VARCHAR2,
    x_closed_ind                        IN     VARCHAR2,
    x_mode                              IN     VARCHAR2 DEFAULT 'R'
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 27-DEC-2001
  ||  Purpose : Handles the INSERT DML logic for the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */
    CURSOR c IS
      SELECT   rowid
      FROM     igs_as_appr_grd_sch
      WHERE    assessment_type                   = x_assessment_type
      AND      grading_schema_cd                 = x_grading_schema_cd
      AND      gs_version_number                 = x_gs_version_number
      AND      unit_cd                           = x_unit_cd
      AND      version_number                    = x_version_number;
Line: 461

    x_last_update_date           DATE;
Line: 462

    x_last_updated_by            NUMBER;
Line: 463

    x_last_update_login          NUMBER;
Line: 467

    x_last_update_date := SYSDATE;
Line: 469

      x_last_updated_by := 1;
Line: 470

      x_last_update_login := 0;
Line: 472

      x_last_updated_by := fnd_global.user_id;
Line: 473

      IF (x_last_updated_by IS NULL) THEN
        x_last_updated_by := -1;
Line: 476

      x_last_update_login := fnd_global.login_id;
Line: 477

      IF (x_last_update_login IS NULL) THEN
        x_last_update_login := -1;
Line: 487

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_unit_cd                           => x_unit_cd,
      x_version_number                    => x_version_number,
      x_assessment_type                   => x_assessment_type,
      x_grading_schema_cd                 => x_grading_schema_cd,
      x_gs_version_number                 => x_gs_version_number,
      x_default_ind                       => x_default_ind,
      x_closed_ind                        => x_closed_ind,
      x_creation_date                     => x_last_update_date,
      x_created_by                        => x_last_updated_by,
      x_last_update_date                  => x_last_update_date,
      x_last_updated_by                   => x_last_updated_by,
      x_last_update_login                 => x_last_update_login
    );
Line: 503

    INSERT INTO igs_as_appr_grd_sch (
      unit_cd,
      version_number,
      assessment_type,
      grading_schema_cd,
      gs_version_number,
      default_ind,
      closed_ind,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login
    ) VALUES (
      new_references.unit_cd,
      new_references.version_number,
      new_references.assessment_type,
      new_references.grading_schema_cd,
      new_references.gs_version_number,
      new_references.default_ind,
      new_references.closed_ind,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 539

  END insert_row;
Line: 562

      SELECT
        default_ind,
        closed_ind
      FROM  igs_as_appr_grd_sch
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 576

      fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
Line: 600

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_unit_cd                           IN     VARCHAR2,
    x_version_number                    IN     NUMBER,
    x_assessment_type                   IN     VARCHAR2,
    x_grading_schema_cd                 IN     VARCHAR2,
    x_gs_version_number                 IN     NUMBER,
    x_default_ind                       IN     VARCHAR2,
    x_closed_ind                        IN     VARCHAR2,
    x_mode                              IN     VARCHAR2 DEFAULT 'R'
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 27-DEC-2001
  ||  Purpose : Handles the UPDATE DML logic for the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */
    x_last_update_date           DATE ;
Line: 621

    x_last_updated_by            NUMBER;
Line: 622

    x_last_update_login          NUMBER;
Line: 626

    x_last_update_date := SYSDATE;
Line: 628

      x_last_updated_by := 1;
Line: 629

      x_last_update_login := 0;
Line: 631

      x_last_updated_by := fnd_global.user_id;
Line: 632

      IF x_last_updated_by IS NULL THEN
        x_last_updated_by := -1;
Line: 635

      x_last_update_login := fnd_global.login_id;
Line: 636

      IF (x_last_update_login IS NULL) THEN
        x_last_update_login := -1;
Line: 646

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_unit_cd                           => x_unit_cd,
      x_version_number                    => x_version_number,
      x_assessment_type                   => x_assessment_type,
      x_grading_schema_cd                 => x_grading_schema_cd,
      x_gs_version_number                 => x_gs_version_number,
      x_default_ind                       => x_default_ind,
      x_closed_ind                        => x_closed_ind,
      x_creation_date                     => x_last_update_date,
      x_created_by                        => x_last_updated_by,
      x_last_update_date                  => x_last_update_date,
      x_last_updated_by                   => x_last_updated_by,
      x_last_update_login                 => x_last_update_login
    );
Line: 662

    UPDATE igs_as_appr_grd_sch
      SET
        default_ind                       = new_references.default_ind,
        closed_ind                        = new_references.closed_ind,
        last_update_date                  = x_last_update_date,
        last_updated_by                   = x_last_updated_by,
        last_update_login                 = x_last_update_login
      WHERE rowid = x_rowid;
Line: 675

  END update_row;
Line: 692

  ||  Purpose : Adds a row if there is no existing row, otherwise updates existing row in the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */
    CURSOR c1 IS
      SELECT   rowid
      FROM     igs_as_appr_grd_sch
      WHERE    assessment_type                   = x_assessment_type
      AND      grading_schema_cd                 = x_grading_schema_cd
      AND      gs_version_number                 = x_gs_version_number
      AND      unit_cd                           = x_unit_cd
      AND      version_number                    = x_version_number;
Line: 714

      insert_row (
        x_rowid,
        x_unit_cd,
        x_version_number,
        x_assessment_type,
        x_grading_schema_cd,
        x_gs_version_number,
        x_default_ind,
        x_closed_ind,
        x_mode
      );
Line: 729

    update_row (
      x_rowid,
      x_unit_cd,
      x_version_number,
      x_assessment_type,
      x_grading_schema_cd,
      x_gs_version_number,
      x_default_ind,
      x_closed_ind,
      x_mode
    );
Line: 744

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 27-DEC-2001
  ||  Purpose : Handles the DELETE DML logic for the table.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */
  BEGIN

    before_dml (
      p_action => 'DELETE',
      x_rowid => x_rowid
    );
Line: 763

    DELETE FROM igs_as_appr_grd_sch
    WHERE rowid = x_rowid;
Line: 770

  END delete_row;