DBA Data[Home] [Help]

APPS.IGI_IAC_REVAL_HIST_PKG SQL Statements

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

Line: 20

FUNCTION Insert_rows ( P_Asset_id Number,
                             P_Book_type_code Varchar2)
RETURN BOOLEAN
IS
      -- main select fetching all revaluation transactions in IAC
      CURSOR c_get_iac_transactions IS
      SELECT Adjustment_id,transaction_header_id,
             transaction_type_code,transaction_sub_type,
             transaction_date_entered,
             period_counter,adjustment_status
      FROM IGI_IAC_TRANSACTION_HEADERS
      WHERE asset_id = p_asset_id
      AND book_type_code = p_book_type_code
      AND transaction_type_code IN ('ADDITION','REVALUATION','RECLASS','ADJUSTMENT')
      AND transaction_sub_type IN  ('REVALUATION','OCCASSIONAL','INDEXED','CATCHUP','PROFESSIONAL','IMPLEMENTATION','COST')
      AND Adjustment_status IN     ( 'COMPLETE','RUN')
      ORDER BY adjustment_id;
Line: 40

      SELECT *
      FROM IGI_IAC_TRANSACTION_HEADERS
      WHERE asset_id = p_asset_id
      AND book_type_code = p_book_type_code
      AND adjustment_id  = ( SELECT MAX(adjustment_id)
                             FROM IGI_IAC_TRANSACTION_HEADERS
                              WHERE asset_id = p_asset_id
                              AND book_type_code = p_book_type_code
                              AND Adjustment_status IN ( 'COMPLETE','RUN')
                              AND adjustment_id < p_adj_id)
      AND Adjustment_status IN ( 'COMPLETE','RUN');
Line: 54

      SELECT *
      FROM IGI_IAC_TRANSACTION_HEADERS
      WHERE asset_id = p_asset_id
      AND book_type_code = p_book_type_code
      AND adjustment_id  = ( SELECT MAX(adjustment_id)
                             FROM IGI_IAC_TRANSACTION_HEADERS
                              WHERE asset_id = p_asset_id
                              AND book_type_code = p_book_type_code
                              AND Adjustment_status IN ( 'COMPLETE','RUN')
                              AND transaction_type_code = 'RECLASS'
                              AND transaction_sub_type IS NULL
                              AND adjustment_id < p_adj_id)
      AND Adjustment_status IN ( 'COMPLETE','RUN')
      AND transaction_type_code = 'RECLASS'
      AND transaction_sub_type IS NULL;
Line: 73

      SELECT *
      FROM IGI_IAC_REVAL_HISTORY
      WHERE asset_id = p_asset_id
      AND book_type_code = p_book_type_code;
Line: 81

      SELECT cost,date_placed_in_service
      FROM fa_books fb,igi_iac_transactioN_headers igth
      WHERE fb.asset_id = p_asset_id
      AND   fb.book_type_code =p_book_type_code
      AND   fb.asset_id = igth.asset_id
      AND   fb.book_type_code = igth.book_type_code
      AND   igth.adjustment_id = p_adj_id
       and fb.date_effective < igth.transaction_date_entered
       and nvl(fb.date_ineffective,igth.transaction_date_entered) >= igth.transaction_date_entered;
Line: 95

      SELECT cost,
             date_placed_in_service
      FROM   fa_books fb,
             igi_iac_transaction_headers igth
      WHERE fb.asset_id = p_asset_id
      AND   fb.book_type_code =p_book_type_code
      AND   fb.asset_id = igth.asset_id
      AND   fb.book_type_code = igth.book_type_code
      AND   igth.adjustment_id = cp_adj_id
      AND   igth.transaction_header_id = cp_trx_hdr_id
      AND   igth.transaction_header_id = fb.transaction_header_id_out;
Line: 111

      SELECT cost,
             date_placed_in_service
      FROM   fa_books fb,
             igi_iac_transaction_headers igth
      WHERE fb.asset_id = p_asset_id
      AND   fb.book_type_code =p_book_type_code
      AND   fb.asset_id = igth.asset_id
      AND   fb.book_type_code = igth.book_type_code
      AND   igth.adjustment_id = cp_adj_id
      AND   igth.transaction_header_id = cp_trx_hdr_id
      AND   igth.transaction_header_id = fb.transaction_header_id_in;
Line: 128

      SELECT cost,
             date_placed_in_service
      FROM   fa_books fb,
             igi_iac_transaction_headers igth
      WHERE  fb.asset_id = p_asset_id
      AND    fb.book_type_code = p_book_type_code
      AND    fb.asset_id = igth.asset_id
      AND    fb.book_type_code = igth.book_type_code
      AND    igth.adjustment_id_out = cp_adj_id
      AND    fb.date_effective < (SELECT fah.date_effective
                                  FROM fa_asset_history fah
                                  WHERE fah.transaction_header_id_in = igth.transaction_header_id
                                  AND   fah.asset_id = p_asset_id)
      AND    nvl(fb.date_ineffective,igth.transaction_date_entered) >= igth.transaction_date_entered;
Line: 145

      SELECT cost,
             date_placed_in_service
      FROM   fa_books fb,
             igi_iac_transactioN_headers igth
      WHERE  fb.asset_id = p_asset_id
      AND    fb.book_type_code = p_book_type_code
      AND    fb.asset_id = igth.asset_id
      AND    fb.book_type_code = igth.book_type_code
      AND    igth.adjustment_id = cp_adj_id
      AND    fb.date_effective < (SELECT fah.date_effective
                                  FROM fa_asset_history fah
                                  WHERE fah.transaction_header_id_in = igth.transaction_header_id
                                  AND   fah.asset_id = p_asset_id)
      AND nvl(fb.date_ineffective,igth.transaction_date_entered) >= igth.transaction_date_entered;
Line: 163

      SELECT SUM(adjustment_cost) Iac_cost
      FROM igi_iac_det_balances
      WHERE asset_id =p_asset_id
      AND book_type_Code = p_book_type_code
      AND adjustment_id = P_adjustment_id
      AND NVL(active_flag,'Y') = 'Y'
      GROUP BY asset_id,adjustment_id;
Line: 173

      Select *
      From fa_transaction_headers
      Where asset_id=p_asset_id
      and book_type_code =p_book_type_code
      and transaction_header_id =p_transaction_header_id;
Line: 236

      l_path := g_path||'Insert_rows';
Line: 538

              INSERT INTO igi_iac_reval_history
               ( ASSET_ID ,
                 BOOK_TYPE_CODE ,
                 ADJUSTMENT_ID ,
                 PERIOD_COUNTER ,
                 REVALUATION_TYPE ,
                 REVALUATION_METHOD ,
                 EFFECTIVE_PERIOD ,
                 PERIOD_ENTERED ,
                 PRE_REVAL_COST ,
                 NEW_REVAL_COST )
              VALUES
               (p_asset_id,
                P_book_type_code,
                l_get_current_adj_id,
                l_lac_reval_history(l_idx2).period_counter,
                l_lac_reval_history(l_idx2).transaction_type_code,
                l_lac_reval_history(l_idx2).transaction_sub_type,
                l_prd_rec_pre.period_name,
                l_prd_rec.period_name,
                l_get_previous_cost,
                l_get_current_Cost );
Line: 572

END insert_rows;
Line: 578

FUNCTION Delete_rows( P_Asset_id Number,
                      P_Book_type_code Varchar2)
RETURN boolean IS

      CURSOR c_get_iac_history IS
      SELECT *
      FROM IGI_IAC_REVAL_HISTORY
      WHERE asset_id = p_asset_id
      AND book_type_code = p_book_type_code;
Line: 592

     l_path 			 := g_path||'Delete_rows';
Line: 604

      DELETE FROM igi_iac_reval_history
      WHERE asset_id =  p_asset_id
      AND book_type_code = p_book_type_code;
Line: 615

END delete_rows;