DBA Data[Home] [Help]

APPS.IGS_PE_VISIT_HISTRY_PKG SQL Statements

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

Line: 40

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 28-NOV-2002
  ||  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_pe_visit_histry
      WHERE    rowid = x_rowid;
Line: 67

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

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

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

    new_references.last_update_date                  := x_last_update_date;
Line: 114

    new_references.last_updated_by                   := x_last_updated_by;
Line: 115

    new_references.last_update_login                 := x_last_update_login;
Line: 138

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

  PROCEDURE beforerowinsertupdate(p_inserting BOOLEAN,p_updating BOOLEAN) AS
  /*
  ||  Created By : pkpatel
  ||  Created On : 6-Jun-2005
  ||  Purpose : Handles the Unique Constraint logic defined for the columns.
  ||  Known limitations, enhancements or remarks :
  ||  Change History :
  ||  Who             When            What
  ||  (reverse chronological order - newest change first)
  */
   CURSOR visa_dtl_cur (cp_visa_id igs_pe_visa.visa_id%TYPE) IS
   SELECT visa_issue_date, visa_expiry_date
   FROM igs_pe_visa
   WHERE visa_id = cp_visa_id;
Line: 163

    IF p_inserting THEN
         OPEN visa_dtl_cur(new_references.visa_id);
Line: 199

    IF p_inserting OR p_updating THEN
		IF new_references.visit_start_date > new_references.visit_end_date THEN
			  FND_MESSAGE.SET_NAME ('IGS', 'IGS_PE_FROM_DT_GRT_TO_DATE');
Line: 206

  END beforerowinsertupdate;
Line: 223

      SELECT   rowid
      FROM     igs_pe_visit_histry
      WHERE    port_of_entry = x_port_of_entry
      AND      cntry_entry_form_num = x_cntry_entry_form_num
      FOR UPDATE NOWAIT;
Line: 259

      SELECT   rowid
      FROM     igs_pe_visit_histry
      WHERE   ((visa_id = x_visa_id));
Line: 313

    x_last_update_date                  IN     DATE,
    x_last_updated_by                   IN     NUMBER,
    x_last_update_login                 IN     NUMBER
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 28-NOV-2002
  ||  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_port_of_entry,
      x_cntry_entry_form_num,
      x_visa_id,
      x_visit_start_date,
      x_visit_end_date,
      x_remarks,
      x_attribute_category,
      x_attribute1,
      x_attribute2,
      x_attribute3,
      x_attribute4,
      x_attribute5,
      x_attribute6,
      x_attribute7,
      x_attribute8,
      x_attribute9,
      x_attribute10,
      x_attribute11,
      x_attribute12,
      x_attribute13,
      x_attribute14,
      x_attribute15,
      x_attribute16,
      x_attribute17,
      x_attribute18,
      x_attribute19,
      x_attribute20,
      x_creation_date,
      x_created_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    );
Line: 366

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to Before Insert.
      beforerowinsertupdate(TRUE,FALSE);
Line: 379

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to Before Update.
      beforerowinsertupdate(FALSE,TRUE);
Line: 383

    ELSIF (p_action = 'VALIDATE_INSERT') THEN
      -- Call all the procedures related to Before Insert.
      IF ( get_pk_for_validation (
             new_references.port_of_entry,
             new_references.cntry_entry_form_num
           )
         ) THEN
        fnd_message.set_name('IGS','IGS_PE_PORT_DUP_EXISTS');
Line: 398

 PROCEDURE afterrowinsertupdate(
    p_inserting IN BOOLEAN,
    p_updating IN BOOLEAN,
    p_deleting IN BOOLEAN
    ) AS
  ------------------------------------------------------------------------------------------
  --Created by  : pkpatel
  --Date created: 24-FEB-2003
  --
  --Purpose:Bug 2783882. Moved the overlap validation from library post-forms-commit
  --
  --Known limitations/enhancements and/or remarks:
  --
  --Change History:
  --Who         When            What
  ----------------------------------------------------------------------------------------------

 CURSOR c_visit_hist_overlap(cp_person_id igs_pe_visa.person_id%TYPE) IS
 SELECT count(1)
 FROM igs_pe_visit_histry_v a ,igs_pe_visit_histry_v b
 WHERE a.person_id = cp_person_id AND
       a.person_id = b.person_id AND
       a.row_id <> b.row_id        AND
	   NVL(a.visit_end_date,TO_DATE('4712/12/31','YYYY/MM/DD')) >=  b.visit_start_date AND
	   NVL(a.visit_end_date,TO_DATE('4712/12/31','YYYY/MM/DD')) <= NVL(b.visit_end_date,TO_DATE('4712/12/31','YYYY/MM/DD'));
Line: 425

 SELECT person_id
 FROM   igs_pe_visa
 WHERE  visa_id = cp_visa_id;
Line: 447

 END afterrowinsertupdate;
Line: 466

    IF (p_action = 'INSERT') THEN
      -- Call all the procedures related to After Insert.
      AfterRowInsertUpdate (
          p_inserting => TRUE,
          p_updating  => FALSE,
          p_deleting  => FALSE
         );
Line: 473

    ELSIF (p_action = 'UPDATE') THEN
      -- Call all the procedures related to After Update.
      AfterRowInsertUpdate (
          p_inserting => FALSE,
          p_updating  => TRUE,
          p_deleting  => FALSE
                  );
Line: 480

    ELSIF (p_action = 'DELETE') THEN
      -- Call all the procedures related to After Delete.
      Null;
Line: 486

  PROCEDURE insert_row (
    x_rowid                             IN OUT NOCOPY VARCHAR2,
    x_port_of_entry                     IN     VARCHAR2,
    x_cntry_entry_form_num              IN     VARCHAR2,
    x_visa_id                           IN     NUMBER,
    x_visit_start_date                  IN     DATE,
    x_visit_end_date                    IN     DATE,
    x_remarks                           IN     VARCHAR2,
    x_attribute_category                IN     VARCHAR2,
    x_attribute1                        IN     VARCHAR2,
    x_attribute2                        IN     VARCHAR2,
    x_attribute3                        IN     VARCHAR2,
    x_attribute4                        IN     VARCHAR2,
    x_attribute5                        IN     VARCHAR2,
    x_attribute6                        IN     VARCHAR2,
    x_attribute7                        IN     VARCHAR2,
    x_attribute8                        IN     VARCHAR2,
    x_attribute9                        IN     VARCHAR2,
    x_attribute10                       IN     VARCHAR2,
    x_attribute11                       IN     VARCHAR2,
    x_attribute12                       IN     VARCHAR2,
    x_attribute13                       IN     VARCHAR2,
    x_attribute14                       IN     VARCHAR2,
    x_attribute15                       IN     VARCHAR2,
    x_attribute16                       IN     VARCHAR2,
    x_attribute17                       IN     VARCHAR2,
    x_attribute18                       IN     VARCHAR2,
    x_attribute19                       IN     VARCHAR2,
    x_attribute20                       IN     VARCHAR2,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 28-NOV-2002
  ||  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)
  */

    x_last_update_date           DATE;
Line: 528

    x_last_updated_by            NUMBER;
Line: 529

    x_last_update_login          NUMBER;
Line: 533

    x_last_update_date := SYSDATE;
Line: 535

      x_last_updated_by := 1;
Line: 536

      x_last_update_login := 0;
Line: 538

      x_last_updated_by := fnd_global.user_id;
Line: 539

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

      x_last_update_login := fnd_global.login_id;
Line: 543

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

      p_action                            => 'INSERT',
      x_rowid                             => x_rowid,
      x_port_of_entry                     => x_port_of_entry,
      x_cntry_entry_form_num              => x_cntry_entry_form_num,
      x_visa_id                           => x_visa_id,
      x_visit_start_date                  => x_visit_start_date,
      x_visit_end_date                    => x_visit_end_date,
      x_remarks                           => x_remarks,
      x_attribute_category                => x_attribute_category,
      x_attribute1                        => x_attribute1,
      x_attribute2                        => x_attribute2,
      x_attribute3                        => x_attribute3,
      x_attribute4                        => x_attribute4,
      x_attribute5                        => x_attribute5,
      x_attribute6                        => x_attribute6,
      x_attribute7                        => x_attribute7,
      x_attribute8                        => x_attribute8,
      x_attribute9                        => x_attribute9,
      x_attribute10                       => x_attribute10,
      x_attribute11                       => x_attribute11,
      x_attribute12                       => x_attribute12,
      x_attribute13                       => x_attribute13,
      x_attribute14                       => x_attribute14,
      x_attribute15                       => x_attribute15,
      x_attribute16                       => x_attribute16,
      x_attribute17                       => x_attribute17,
      x_attribute18                       => x_attribute18,
      x_attribute19                       => x_attribute19,
      x_attribute20                       => x_attribute20,
      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: 589

    INSERT INTO igs_pe_visit_histry (
      port_of_entry,
      cntry_entry_form_num,
      visa_id,
      visit_start_date,
      visit_end_date,
      remarks,
      attribute_category,
      attribute1,
      attribute2,
      attribute3,
      attribute4,
      attribute5,
      attribute6,
      attribute7,
      attribute8,
      attribute9,
      attribute10,
      attribute11,
      attribute12,
      attribute13,
      attribute14,
      attribute15,
      attribute16,
      attribute17,
      attribute18,
      attribute19,
      attribute20,
      creation_date,
      created_by,
      last_update_date,
      last_updated_by,
      last_update_login
    ) VALUES (
      new_references.port_of_entry,
      new_references.cntry_entry_form_num,
      new_references.visa_id,
      new_references.visit_start_date,
      new_references.visit_end_date,
      new_references.remarks,
      new_references.attribute_category,
      new_references.attribute1,
      new_references.attribute2,
      new_references.attribute3,
      new_references.attribute4,
      new_references.attribute5,
      new_references.attribute6,
      new_references.attribute7,
      new_references.attribute8,
      new_references.attribute9,
      new_references.attribute10,
      new_references.attribute11,
      new_references.attribute12,
      new_references.attribute13,
      new_references.attribute14,
      new_references.attribute15,
      new_references.attribute16,
      new_references.attribute17,
      new_references.attribute18,
      new_references.attribute19,
      new_references.attribute20,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_date,
      x_last_updated_by,
      x_last_update_login
    ) RETURNING ROWID INTO x_rowid;
Line: 658

     p_action => 'INSERT',
     x_rowid => X_ROWID
   );
Line: 662

  END insert_row;
Line: 705

      SELECT
        visa_id,
        visit_start_date,
        visit_end_date,
        remarks,
        attribute_category,
        attribute1,
        attribute2,
        attribute3,
        attribute4,
        attribute5,
        attribute6,
        attribute7,
        attribute8,
        attribute9,
        attribute10,
        attribute11,
        attribute12,
        attribute13,
        attribute14,
        attribute15,
        attribute16,
        attribute17,
        attribute18,
        attribute19,
        attribute20
      FROM  igs_pe_visit_histry
      WHERE rowid = x_rowid
      FOR UPDATE NOWAIT;
Line: 742

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

  PROCEDURE update_row (
    x_rowid                             IN     VARCHAR2,
    x_port_of_entry                     IN     VARCHAR2,
    x_cntry_entry_form_num              IN     VARCHAR2,
    x_visa_id                           IN     NUMBER,
    x_visit_start_date                  IN     DATE,
    x_visit_end_date                    IN     DATE,
    x_remarks                           IN     VARCHAR2,
    x_attribute_category                IN     VARCHAR2,
    x_attribute1                        IN     VARCHAR2,
    x_attribute2                        IN     VARCHAR2,
    x_attribute3                        IN     VARCHAR2,
    x_attribute4                        IN     VARCHAR2,
    x_attribute5                        IN     VARCHAR2,
    x_attribute6                        IN     VARCHAR2,
    x_attribute7                        IN     VARCHAR2,
    x_attribute8                        IN     VARCHAR2,
    x_attribute9                        IN     VARCHAR2,
    x_attribute10                       IN     VARCHAR2,
    x_attribute11                       IN     VARCHAR2,
    x_attribute12                       IN     VARCHAR2,
    x_attribute13                       IN     VARCHAR2,
    x_attribute14                       IN     VARCHAR2,
    x_attribute15                       IN     VARCHAR2,
    x_attribute16                       IN     VARCHAR2,
    x_attribute17                       IN     VARCHAR2,
    x_attribute18                       IN     VARCHAR2,
    x_attribute19                       IN     VARCHAR2,
    x_attribute20                       IN     VARCHAR2,
    x_mode                              IN     VARCHAR2
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 28-NOV-2002
  ||  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: 830

    x_last_updated_by            NUMBER;
Line: 831

    x_last_update_login          NUMBER;
Line: 834

      SELECT   rowid
      FROM     igs_pe_visit_histry
      WHERE    port_of_entry = x_port_of_entry
      AND      cntry_entry_form_num = x_cntry_entry_form_num
      AND      rowid <> x_rowid
      FOR UPDATE NOWAIT;
Line: 845

    x_last_update_date := SYSDATE;
Line: 847

      x_last_updated_by := 1;
Line: 848

      x_last_update_login := 0;
Line: 850

      x_last_updated_by := fnd_global.user_id;
Line: 851

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

      x_last_update_login := fnd_global.login_id;
Line: 855

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

      p_action                            => 'UPDATE',
      x_rowid                             => x_rowid,
      x_port_of_entry                     => x_port_of_entry,
      x_cntry_entry_form_num              => x_cntry_entry_form_num,
      x_visa_id                           => x_visa_id,
      x_visit_start_date                  => x_visit_start_date,
      x_visit_end_date                    => x_visit_end_date,
      x_remarks                           => x_remarks,
      x_attribute_category                => x_attribute_category,
      x_attribute1                        => x_attribute1,
      x_attribute2                        => x_attribute2,
      x_attribute3                        => x_attribute3,
      x_attribute4                        => x_attribute4,
      x_attribute5                        => x_attribute5,
      x_attribute6                        => x_attribute6,
      x_attribute7                        => x_attribute7,
      x_attribute8                        => x_attribute8,
      x_attribute9                        => x_attribute9,
      x_attribute10                       => x_attribute10,
      x_attribute11                       => x_attribute11,
      x_attribute12                       => x_attribute12,
      x_attribute13                       => x_attribute13,
      x_attribute14                       => x_attribute14,
      x_attribute15                       => x_attribute15,
      x_attribute16                       => x_attribute16,
      x_attribute17                       => x_attribute17,
      x_attribute18                       => x_attribute18,
      x_attribute19                       => x_attribute19,
      x_attribute20                       => x_attribute20,
      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: 912

    UPDATE igs_pe_visit_histry
      SET
        cntry_entry_form_num              = new_references.cntry_entry_form_num,
        port_of_entry                     = new_references.port_of_entry,
        visa_id                           = new_references.visa_id,
        visit_start_date                  = new_references.visit_start_date,
        visit_end_date                    = new_references.visit_end_date,
        remarks                           = new_references.remarks,
        attribute_category                = new_references.attribute_category,
        attribute1                        = new_references.attribute1,
        attribute2                        = new_references.attribute2,
        attribute3                        = new_references.attribute3,
        attribute4                        = new_references.attribute4,
        attribute5                        = new_references.attribute5,
        attribute6                        = new_references.attribute6,
        attribute7                        = new_references.attribute7,
        attribute8                        = new_references.attribute8,
        attribute9                        = new_references.attribute9,
        attribute10                       = new_references.attribute10,
        attribute11                       = new_references.attribute11,
        attribute12                       = new_references.attribute12,
        attribute13                       = new_references.attribute13,
        attribute14                       = new_references.attribute14,
        attribute15                       = new_references.attribute15,
        attribute16                       = new_references.attribute16,
        attribute17                       = new_references.attribute17,
        attribute18                       = new_references.attribute18,
        attribute19                       = new_references.attribute19,
        attribute20                       = new_references.attribute20,
        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: 951

    p_action => 'UPDATE',
    x_rowid => X_ROWID
    );
Line: 955

  END update_row;
Line: 992

  ||  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_pe_visit_histry
      WHERE    port_of_entry                     = x_port_of_entry
      AND      cntry_entry_form_num              = x_cntry_entry_form_num;
Line: 1011

      insert_row (
        x_rowid,
        x_port_of_entry,
        x_cntry_entry_form_num,
        x_visa_id,
        x_visit_start_date,
        x_visit_end_date,
        x_remarks,
        x_attribute_category,
        x_attribute1,
        x_attribute2,
        x_attribute3,
        x_attribute4,
        x_attribute5,
        x_attribute6,
        x_attribute7,
        x_attribute8,
        x_attribute9,
        x_attribute10,
        x_attribute11,
        x_attribute12,
        x_attribute13,
        x_attribute14,
        x_attribute15,
        x_attribute16,
        x_attribute17,
        x_attribute18,
        x_attribute19,
        x_attribute20,
        x_mode
      );
Line: 1046

    update_row (
      x_rowid,
      x_port_of_entry,
      x_cntry_entry_form_num,
      x_visa_id,
      x_visit_start_date,
      x_visit_end_date,
      x_remarks,
      x_attribute_category,
      x_attribute1,
      x_attribute2,
      x_attribute3,
      x_attribute4,
      x_attribute5,
      x_attribute6,
      x_attribute7,
      x_attribute8,
      x_attribute9,
      x_attribute10,
      x_attribute11,
      x_attribute12,
      x_attribute13,
      x_attribute14,
      x_attribute15,
      x_attribute16,
      x_attribute17,
      x_attribute18,
      x_attribute19,
      x_attribute20,
      x_mode
    );
Line: 1081

  PROCEDURE delete_row (
    x_rowid IN VARCHAR2
  ) AS
  /*
  ||  Created By : [email protected]
  ||  Created On : 28-NOV-2002
  ||  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: 1100

    DELETE FROM igs_pe_visit_histry
    WHERE rowid = x_rowid;
Line: 1107

  END delete_row;