Query To Pick Data From Mass Addtions Table

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

SELECT a.feeder_system_name, a.CONTEXT, a.book_type_code, a.asset_type, a.po_vendor_id, (SELECT rsh.

receipt_num FROM rcv_lot_transactions rlt, rcv_shipment_lines rsl, rcv_shipment_headers rsh, po_headers_all pha WHERE rlt.shipment_line_id = rsl.shipment_line_id AND rsl.shipment_header_id = rsh.shipment_header_id AND rsl.po_header_id = pha.po_header_id AND rlt.item_id = rsl.item_id AND rsl.po_header_id IS NOT NULL AND rlt.lot_num = a.attribute3 AND rlt.item_id IN (SELECT inventory_item_id FROM mtl_system_items_b WHERE segment1 = a.attribute4 AND ROWNUM = 1 ) AND segment1 = a.po_number AND ROWNUM = 1) grn_number, a.vendor_name, a.vendor_number, a.po_number, a.invoice_number, a.invoice_date, a.date_placed_in_service, a.description, a.attribute3 "LOT_NUMBER", a.fixed_assets_cost, a.fixed_assets_units, a.unit_of_measure, (SELECT concatenated_segments FROM gl_code_combinations_kfv WHERE code_combination_id = a.payables_code_combination_id) payables_accoun t, (SELECT concatenated_segments FROM gl_code_combinations_kfv WHERE code_combination_id = a.expense_code_combination_id) expense_code_accoun t, (SELECT segment1 || '.' || segment2 || '.' || segment3 || '.' || segment4 FROM fa_categories_vl WHERE category_id = a.asset_category_id) asset_category, (SELECT segment3 FROM fa_locations WHERE location_id = b.location_id) site_id, (SELECT segment1 || '-' || segment2 || '-' || segment3 || '-' || segment4 FROM fa_locations WHERE location_id = b.location_id) asset_location, (SELECT concatenated_segments FROM gl_code_combinations_kfv WHERE code_combination_id = deprn_expense_ccid)

depreciation_expense_accoun t, a.depreciate_flag, a.attribute4 "ITEM_NUMBER", a.attribute1 move_order_number, a.attribute2 move_order_issue_date, a.queue_name fa_mass_additions_v a, fa_massadd_distributions b a.mass_addition_id = b.mass_addition_id a.book_type_code = 'ZNG ASSETS' a.feeder_system_name = 'ORACLE INVENTORY' trunc(a.creation_date)>='01-JUL-2012' trunc(a.creation_date)<='30-SEP-2012'

FROM WHERE AND AND AND AND

You might also like