DBA Data[Home] [Help]

APPS.AME_TRANS_DATA_PURGE SQL Statements

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

Line: 14

      select attribute_id
      from ame_attribute_usages
      where
        application_id = applicationIdIn and
        sysdate between start_date and
                 nvl(end_date - ame_util.oneSecond, sysdate);
Line: 21

           select transaction_id
             from ame_temp_transactions
            where application_id = applicationIdIn and
                   row_timestamp < lastDateToSave;
Line: 27

      select
        name,
        item_class,
        item_id,
        approver_category,
        api_insertion,
        authority,
        approval_status,
        action_type_id,
        group_or_chain_id,
        occurrence
        from ame_temp_old_approver_lists
        where
          application_id = applicationIdIn and
          transaction_id = transactionIdIn
        order by order_number;
Line: 52

    approverApiInsertions ame_util.StringList;
Line: 64

        select application_name
          into applicationName
          from ame_calling_apps
         where application_id = applicationIdIn
           and sysdate between start_date and nvl(end_date - 1/86400,sysdate);
Line: 79

          ame_attribute_pkg.updateUseCount(attributeIdIn   => attributeId,
                                           applicationIdIn => applicationIdIn);
Line: 103

                ,approverApiInsertions
                ,approverAuthorities
                ,approverStatuses
                ,approverActionTypeIds
                ,approverGroupOrChainIds
                ,approverOccurrences ;
Line: 122

                  transactionIds.delete(i);
Line: 127

                  transactionIds.delete(i);
Line: 142

       /* Do bulk deletes */
       FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'No.of transaction ids to be purged: '||transactionIds.count);
Line: 147

           delete from ame_temp_old_approver_lists
            where application_id = applicationIdIn and
                  transaction_id = transactionIds(ct);
Line: 150

         /* ame_temp_insertions */
         forall ct in transactionIds.first..transactionIds.last
           delete from ame_temp_insertions
            where application_id = applicationIdIn and
                  transaction_id = transactionIds(ct);
Line: 157

           delete from ame_temp_deletions
            where application_id = applicationIdIn and
                  transaction_id = transactionIds(ct);
Line: 162

           delete from ame_trans_approval_history
            where application_id = applicationIdIn and
                  transaction_id = transactionIds(ct);
Line: 167

           delete from ame_temp_transactions
            where application_id = applicationIdIn
              and transaction_id = transactionIds(ct)
              and trans_deviation_flag is null or trans_deviation_flag = 'D';
Line: 173

    delete from ame_temp_trans_locks
        where row_timestamp < sysdate - 1;
Line: 192

  dateToDelete date;
Line: 203

   select application_id
     from ame_calling_apps
    where fnd_application_id = applictionIdIn
      and sysdate between start_date and nvl(end_Date-(1/86400),sysdate);
Line: 209

  deleteTodayRecordExc exception;
Line: 214

  dateToDelete := l_endDate;
Line: 223

    dateToDelete := sysdate;
Line: 225

    dateToDelete := l_endDate;
Line: 227

  if dateToDelete > trunc(sysdate) or dateToDelete = trunc(sysdate) then
    raise deleteTodayRecordExc;
Line: 233

      delete from ame_txn_approvers
      where temp_transactions_id in
        (select temp_transactions_id
           from ame_temp_transactions
          where trunc(row_timestamp) <= dateToDelete
            and application_id = tempApplication);
Line: 239

      FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);
Line: 240

      update ame_temp_transactions
         set trans_deviation_flag = 'D'
       where trunc(row_timestamp) <= dateToDelete
         and application_id = tempApplication;
Line: 258

        delete from ame_txn_approvers
        where temp_transactions_id in
          (select temp_transactions_id
             from ame_temp_transactions
            where trunc(row_timestamp) <= dateToDelete
              and application_id = applicationIdList(i));
Line: 265

        FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);
Line: 266

        update ame_temp_transactions
           set trans_deviation_flag = 'D'
         where trunc(row_timestamp) <= dateToDelete
           and application_id = applicationIdList(i);
Line: 281

      delete from ame_txn_approvers
      where temp_transactions_id in
        (select temp_transactions_id
           from ame_temp_transactions
          where trunc(row_timestamp) <= dateToDelete);
Line: 286

      FND_FILE.PUT_LINE (FND_FILE.LOG,'number of rows deleted:'||sql%rowcount);
Line: 287

      update ame_temp_transactions
         set trans_deviation_flag = 'D'
       where trunc(row_timestamp) <= dateToDelete;
Line: 313

  when deleteTodayRecordExc then
     errorCode := -20001;