Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
204 views2 pages

Query To Pick Data From Mass Addtions Table

The document is a SQL query that selects asset information from various fixed asset tables to generate a report of assets added between July 1, 2012 and September 30, 2012 with a book type of "ZNG ASSETS" and feeder system of "ORACLE INVENTORY". The query selects the asset name, context, book type, asset type, vendor, GRN number, vendor details, PO details, invoice details, in-service date, description, lot number, cost, units, unit of measure, accounting codes, asset category, site ID, asset location, depreciation expense account, depreciation flag, item number, move order details, and queue name from various tables joined on mass addition ID.

Uploaded by

Martin Kinoti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
204 views2 pages

Query To Pick Data From Mass Addtions Table

The document is a SQL query that selects asset information from various fixed asset tables to generate a report of assets added between July 1, 2012 and September 30, 2012 with a book type of "ZNG ASSETS" and feeder system of "ORACLE INVENTORY". The query selects the asset name, context, book type, asset type, vendor, GRN number, vendor details, PO details, invoice details, in-service date, description, lot number, cost, units, unit of measure, accounting codes, asset category, site ID, asset location, depreciation expense account, depreciation flag, item number, move order details, and queue name from various tables joined on mass addition ID.

Uploaded by

Martin Kinoti
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 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