DBA Data[Home] [Help]

APPS.JAI_RGM_DEFS_PKG SQL Statements

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

Line: 7

                     x_last_update_date           VARCHAR2,
                     x_force_edits                VARCHAR2 )   IS
    v_creation_date date;
Line: 12

    vf_ludate   DATE := to_date(x_last_update_date, 'DD-MM-YYYY HH:MI:SS');
Line: 32

    select creation_date, last_update_date
    from   JAI_RGM_DEFINITIONS
    where regime_code = x_regime_code ;
Line: 37

      /* Check if the row exists in the database. If it does, retrieves the creation date for update_row. */
       OPEN cur_creation_date ;
Line: 45

     /* Removed the check for userid and added check using last_update_date
	for bug 4967445 */

       /* Update only if force_edits is 'Y' or if vf_ludate > vd_ludate */
   if ( vf_ludate > vd_ludate or X_Force_Edits = 'Y' ) then
         -- update row if present
       jai_rgm_defs_pkg.Update_Row(
          X_Rowid                => v_rowid,
          X_regime_code          => X_regime_code ,
          x_description          => x_description        ,
          x_creation_date        => v_creation_date,
          X_last_update_date     => vf_ludate,
          X_last_updated_by      => v_user_id,
          X_last_update_login    => 0);
Line: 62

         jai_rgm_defs_pkg.Insert_Row(
          X_Rowid                => v_rowid,
          X_regime_code          => X_regime_code ,
          x_description          => x_description         ,
          X_last_update_date     => vf_ludate,
          X_last_updated_by      => v_user_id,
          X_creation_date        => sysdate,
          X_created_by           => v_user_id,
          X_last_update_login    => 0) ;
Line: 79

 PROCEDURE Insert_Row(
                     X_Rowid              IN OUT NOCOPY ROWID,
                     X_regime_code            VARCHAR2,
                     x_description            VARCHAR2,
                     X_last_update_date       DATE,
                     X_last_updated_by        NUMBER,
                     X_creation_date          DATE ,
                     X_created_by             NUMBER,
                     X_last_update_login      NUMBER) IS
     CURSOR C_REGIME_ID IS SELECT JAI_RGM_DEFINITIONS_S.nextval FROM dual;
Line: 95

    INSERT INTO JAI_RGM_DEFINITIONS(
                  regime_id            ,
                  regime_code          ,
                  description          ,
                  creation_date        ,
                  created_by           ,
                  last_update_date     ,
                  last_updated_by      ,
                  last_update_login
                )
    SELECT
             x_regime_id           ,
             X_regime_code         ,
             x_description         ,
             X_creation_date       ,
             X_created_by          ,
             X_last_update_date    ,
             X_last_updated_by     ,
             X_last_update_login
    FROM  DUAL ;
Line: 116

  END Insert_Row;
Line: 118

PROCEDURE Update_Row(X_Rowid                   IN OUT NOCOPY ROWID,
                     X_regime_code             VARCHAR2,
                     x_description             VARCHAR2,
                     x_creation_date           DATE,
                     X_last_update_date        DATE,
                     X_last_updated_by         NUMBER,
                     X_last_update_login       NUMBER)
 IS
  BEGIN
    UPDATE JAI_RGM_DEFINITIONS
    SET
        regime_code           = x_regime_code         ,
        description           = x_description         ,
        creation_date         = x_creation_date       ,
        last_update_date      = x_last_update_date    ,
        last_updated_by       = x_last_updated_by     ,
        last_update_login     = x_last_update_login
    WHERE
    regime_code = x_regime_code;
Line: 142

  END Update_Row;