SELECT asset_number
,fab.asset_id
,fat.description
,fab.asset_type
,fcb.segment1||'-'||fcb.segment2 category
,fab.tag_number
,fb.book_type_code
,fabc.book_class
,fb.cost
,fb.recoverable_cost
,(SELECT SUM(deprn_reserve)
FROM fa_deprn_detail
WHERE asset_id = fab.asset_id
AND deprn_run_date = (SELECT MAX(deprn_run_date)
FROM fa_deprn_detail
WHERE asset_id = fab.asset_id
) depriciation_cost
FROM fa_additions_b fab
,fa_additions_tl fat
,fa_categories_b fcb
,fa_books fb
,fa_book_controls fabc
WHERE 1=1
AND fab.asset_id = fat.asset_id
AND fat.language = USERENV('LANG')
AND fcb.category_id=fab.asset_category_id
AND fb.asset_id=fab.asset_id
AND fb.depreciate_flag = 'NO'
AND fab.asset_number = 123456789
No comments:
Post a Comment