The following lines contain the word 'select', 'insert', 'update' or 'delete':
select sum(nvl(fdd.deprn_amount,0)-nvl(fdd.deprn_adjustment_amount,0)) deprn_YTD
from fa_deprn_detail fdd
where fdd.distribution_id = cp_distribution_id
and fdd.book_type_code like cp_book_type_code
and fdd.asset_id = cp_asset_id
and fdd.period_counter in (select period_counter from fa_deprn_periods
where book_type_code = cp_book_type_code
and fiscal_year = (select decode(period_num,1,fiscal_year-1,fiscal_year)
from fa_deprn_periods
where period_close_date is NULL
and book_type_code = cp_book_type_code))
group by fdd.asset_id,fdd.distribution_id;
SELECT DISTINCT asset_id
FROM igi_iac_transaction_headers
WHERE book_type_code = p_book_type_code;
select (nvl(deprn_amount,0) - nvl(deprn_adjustment_amount,0)) deprn_amount,
deprn_reserve,
period_counter
from fa_deprn_detail
where book_type_code = p_book_type_code
and asset_id = cp_asset_id
and distribution_id = cp_distribution_id
and period_counter = (select max(period_counter)
from fa_deprn_summary
where book_type_code = p_book_type_code
and asset_id = cp_asset_id);
SELECT *
FROM igi_iac_det_balances
WHERE book_type_code = p_book_type_code
AND asset_id = cp_asset_id
AND adjustment_id = cp_adjustment_id;
SELECT period_counter
FROM igi_iac_det_balances
WHERE book_type_code = p_book_type_code
AND asset_id = cp_asset_id
AND adjustment_id = cp_adjustment_id
AND distribution_id = cp_distribution_id;
SELECT 'X'
FROM igi_iac_fa_deprn
WHERE book_type_code = p_book_type_code
AND rownum = 1;
Select *
From igi_iac_fa_deprn
Where book_type_code = p_book_type_code
and asset_id = cp_asset_id
and distribution_id = cp_distribution_id
and adjustment_id = cp_adjustment_id
and period_counter = cp_period_counter;
SELECT nvl(period_counter_fully_reserved, 0)
FROM fa_books
WHERE asset_id = cp_asset_id
AND book_type_code = cp_book_type_code
AND transaction_header_id_out IS NULL
AND date_ineffective IS NULL;
igi_iac_debug_pkg.debug_other_string(g_state_level,l_path,' Inserting record for latest adjustment');
IGI_IAC_FA_DEPRN_PKG.insert_row (
x_rowid => l_rowid,
x_adjustment_id => l_adjustment_id,
x_asset_id => l_asset.asset_id,
x_distribution_id => l_dist.distribution_id,
x_book_type_code => p_book_type_code,
x_period_counter => l_dist.period_counter,
x_deprn_period => l_deprn_amount,
x_deprn_ytd => l_deprn_ytd,
x_deprn_reserve => l_deprn_reserve,
x_active_flag => l_dist.active_flag,
x_mode => 'R' );
igi_iac_debug_pkg.debug_other_string(g_state_level,l_path,' Inserting record for latest adjustment');
IGI_IAC_FA_DEPRN_PKG.insert_row (
x_rowid => l_rowid,
x_adjustment_id => l_adjustment_id,
x_asset_id => l_asset.asset_id,
x_distribution_id => l_dist.distribution_id,
x_book_type_code => p_book_type_code,
x_period_counter => l_dist.period_counter,
x_deprn_period => l_deprn_amount,
x_deprn_ytd => l_deprn_ytd,
x_deprn_reserve => l_deprn_reserve,
x_active_flag => l_dist.active_flag,
x_mode => 'R' );
igi_iac_debug_pkg.debug_other_string(g_state_level,l_path,' Inserting record for previous adjustment');
IGI_IAC_FA_DEPRN_PKG.insert_row (
x_rowid => l_rowid,
x_adjustment_id => l_prev_adjustment_id,
x_asset_id => l_asset.asset_id,
x_distribution_id => l_dist.distribution_id,
x_book_type_code => p_book_type_code,
x_period_counter => l_prev_adj_period,
x_deprn_period => l_deprn_amount,
x_deprn_ytd => l_deprn_ytd,
x_deprn_reserve => l_deprn_reserve,
x_active_flag => l_dist.active_flag,
x_mode => 'R' );
igi_iac_debug_pkg.debug_other_string(g_state_level,l_path,' Inserting record for previous adjustment');
IGI_IAC_FA_DEPRN_PKG.insert_row (
x_rowid => l_rowid,
x_adjustment_id => l_prev_adjustment_id,
x_asset_id => l_asset.asset_id,
x_distribution_id => l_dist.distribution_id,
x_book_type_code => p_book_type_code,
x_period_counter => l_prev_adj_period,
x_deprn_period => l_deprn_amount,
x_deprn_ytd => l_deprn_ytd,
x_deprn_reserve => l_deprn_reserve,
x_active_flag => l_dist.active_flag,
x_mode => 'R' );