The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT asset_category_id
FROM fa_additions
WHERE asset_id =p_asset_hdr_rec.asset_id;
SELECT *
FROM fa_books
WHERE book_type_code = p_book_type_code
AND asset_id = p_asset_id
AND transaction_header_id_out = p_transaction_header_id;
SELECT *
FROM igi_iac_adjustments_history
WHERE book_type_code = p_book_type_code
AND period_counter = p_period_counter
AND asset_id = p_asset_id
AND NVL(active_flag,'N') = 'N' ;
l_last_update_date date;
l_last_updated_by number;
l_last_update_login number;
SELECT COUNT(*)
FROM igi_iac_asset_balances
WHERE asset_id = p_asset_id
AND book_type_code = p_book_type_code ;
SELECT 'x'
FROM igi_iac_category_books
WHERE book_type_code = l_book_type_code
AND category_id = l_category_id
AND ROWNUM = 1;
SELECT SUBSTR(VALUE,1,DECODE ((INSTR(VALUE,',', 1, 1)-1),0,LENGTH(VALUE)
,(INSTR(VALUE,',', 1, 1)-1)))
INTO g_output_dir
FROM v$parameter
WHERE name LIKE 'utl%';
UPDATE igi_iac_adjustments_history
SET active_flag = 'Y'
WHERE asset_id = l_iac_adjustment_history.asset_id
AND book_type_code =l_iac_adjustment_history.book_type_code
AND period_counter = l_iac_adjustment_history.period_counter;
l_last_update_date := SYSDATE;
l_last_updated_by := fnd_global.user_id;
IF (l_last_updated_by IS NULL) THEN
l_last_updated_by := -1;
l_last_update_login := fnd_global.login_id;
IF (l_last_update_login IS NULL) THEN
l_last_update_login := -1;
INSERT INTO igi_iac_adjustments_history
(book_type_code,
asset_id ,
category_id ,
date_placed_in_service,
period_counter ,
transaction_type_code ,
transaction_subtype ,
current_period_amortization,
amortization_start_date ,
transaction_header_id_in ,
transaction_header_id_out ,
pre_life_in_months ,
pre_rate_adjustment_factor ,
pre_adjusted_cost ,
pre_salvage_value ,
life_in_months ,
rate_adjustment_factor ,
adjusted_cost ,
salvage_value ,
adjustment_id ,
active_flag,
created_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
adjustment_reval_type
)
VALUES
(l_iac_adjustment_history.book_type_code,
l_iac_adjustment_history.asset_id ,
l_iac_adjustment_history.category_id ,
l_iac_adjustment_history.date_placed_in_service,
l_iac_adjustment_history.period_counter ,
l_iac_adjustment_history.transaction_type_code,
l_iac_adjustment_history.transaction_subtype,
l_iac_adjustment_history.current_period_amortization,
l_iac_adjustment_history.amortization_start_date,
l_iac_adjustment_history.transaction_header_id_in,
l_iac_adjustment_history.transaction_header_id_out,
l_iac_adjustment_history.pre_life_in_months,
l_iac_adjustment_history.pre_rate_adjustment_factor,
l_iac_adjustment_history.pre_adjusted_cost,
l_iac_adjustment_history.pre_salvage_value,
l_iac_adjustment_history.life_in_months,
l_iac_adjustment_history.rate_adjustment_factor,
l_iac_adjustment_history.adjusted_cost,
l_iac_adjustment_history.salvage_value,
l_iac_adjustment_history.adjustment_id,
l_iac_adjustment_history.active_flag,
l_creation_date,
l_created_by,
l_last_update_date,
l_last_updated_by,
l_last_update_login,
l_iac_adjustment_history.adjustment_reval_type);
SELECT *
FROM fa_books
WHERE book_type_code = p_book_type_code
AND asset_id = p_asset_id
AND transaction_header_id_out IS NULL;
SELECT *
FROM fa_transaction_headers
WHERE book_type_code = p_book_type_code
AND asset_id = p_asset_id
AND transaction_header_id = p_transaction_header_id;
SELECT *
FROM fa_deprn_summary
WHERE book_type_code = p_book_type_code
AND asset_id = p_asset_id
AND period_counter = p_period_counter;
SELECT SUM(nvl(deprn_amount,0)) depreciation_amount,
SUM(nvl(deprn_adjustment_amount,0)) depreciation_adjustment_amount,
SUM(nvl(deprn_reserve,0)) depreciation_reserve
FROM fa_deprn_detail
WHERE book_type_code = p_book_type_code
AND asset_id = p_asset_id
AND period_counter = p_period_counter;
SELECT *
FROM fa_deprn_detail
WHERE book_type_code = p_book_type_code
AND asset_id = p_asset_id
AND period_counter = p_period_counter;
SELECT *
FROM igi_iac_adjustments_history
WHERE book_type_code = p_book_type_code
AND period_counter = p_period_counter
AND NVL(active_flag,'N') = 'N' ;
l_last_update_date date;
l_last_updated_by number;
l_last_update_login number;
SELECT SUBSTR(VALUE,1,DECODE ((INSTR(VALUE,',', 1, 1)-1),0,LENGTH(VALUE)
,(INSTR(VALUE,',', 1, 1)-1)))
INTO g_output_dir
FROM v$parameter
WHERE name LIKE 'utl%';
select event_id into p_event_id from fa_deprn_summary
where asset_id=l_get_asset_adj.asset_id
and book_type_code=p_book_type_code
and period_counter=p_period_counter;
l_last_update_date := SYSDATE;
l_last_updated_by := l_user_id;
IF (l_last_updated_by IS NULL) THEN
l_last_updated_by := -1;
l_last_update_login := l_login_id;
IF (l_last_update_login IS NULL) THEN
l_last_update_login := -1;
UPDATE igi_iac_adjustments_history
SET active_flag = 'Y',
last_updated_by = l_last_updated_by,
last_update_date =l_last_update_date,
last_update_login =l_last_update_login
WHERE asset_id = l_get_asset_adj.asset_id
AND book_type_code = l_get_asset_adj.book_type_code;