SQL Performance (MOSC)

MOSC Banner

customize report take a lot of time

edited Apr 26, 2014 4:00AM in SQL Performance (MOSC) 5 commentsAnswered

1- on oracle ebs i create a new report.

2- the main query

SELECT aiv.org_id,

       ailv.inventory_item_id,

       sum(aidv.quantity_invoiced) quantity_invoiced,

       sum(case

             when aiv.invoice_currency_code = 'EGP' then

              aidv.amount

             else

              aidv.amount * aiv.exchange_rate

           end) amount,

       roy_ap_get_automatic_val(ailv.inventory_item_id,

                                :p_vendor_start,

                                :p_vendor_end,

                                :p_start_date,

                                :p_end_date) automatic_val,

roy_ap_get_manual_val(ailv.inventory_item_id,

                             :p_start_date,

                             :p_end_date,

                             :p_vendor_start,

                             :p_vendor_end) MANUAL_VAL

  FROM AP_INVOICES_V              aiv,

       AP_INVOICE_LINES_V         ailv,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center