[Home] [Help]
The following lines contain the word 'select', 'insert', 'update' or 'delete':
select mad.units,
mad.employee_id,
mad.deprn_expense_ccid,
mad.location_id
from fa_massadd_distributions mad
where mad.mass_addition_id = p_mass_add_rec.mass_addition_id
union all
select mad.units,
mad.employee_id,
mad.deprn_expense_ccid,
mad.location_id
from fa_massadd_distributions mad,
fa_mass_additions mac,
fa_mass_additions map
where map.sum_units = 'YES'
and map.mass_addition_id = p_mass_add_rec.mass_addition_id
and map.mass_addition_id = mac.merge_parent_mass_additions_id
and mad.mass_addition_id = mac.mass_addition_id;
SELECT deprn_method,life_in_months
INTO l_method_code, l_life
FROM fa_category_book_defaults
WHERE book_type_code =p_mass_add_rec.book_type_code
AND category_id = p_mass_add_rec.asset_category_id
/* Fix for bug 6884668 Starts here */ -- When multiple defaults exist for different from-date to-date ranges, pick correct one based on DPIS
AND p_mass_add_rec.date_placed_in_service BETWEEN start_dpis AND NVL(end_dpis,p_mass_add_rec.date_placed_in_service + 1);
PROCEDURE Update_All_Records
(p_posting_status IN VARCHAR2,
p_where_clause IN VARCHAR2,
x_success_count OUT NOCOPY NUMBER,
x_failure_count OUT NOCOPY NUMBER,
x_return_status OUT NOCOPY VARCHAR2) IS
TYPE cursor_ref IS REF cursor;
l_calling_fn varchar2(40) := 'fa_massadd_special_pkg.update_all';
select *
from fa_mass_additions
where rowid = l_rowid;
l_sql_statement := 'select row_id ' ||
' from fa_mass_additions_v ' ||
p_where_clause ||
' and posting_status not in (''POSTED'', ''MERGED'', ''SPLIT'')';
update fa_mass_additions
set posting_status = l_posting_status(i),
queue_name = l_queue_name(i), /*Bug 7184647 added following 3 lines*/
last_updated_by = l_user_id,
last_update_date = l_date,
last_update_login = l_login_id
where rowid = l_upd_rowid(i);
l_rowid_tbl.delete;
l_upd_rowid.delete;
END Update_All_Records;