Quantcast
Channel: OTMFAQ Forums
Viewing all articles
Browse latest Browse all 2772

Shipment x Order Release

$
0
0
Hi all

I need to add a column in a report containing the number of primary shipment.
In OTM: Action Menu | Shipment Management | View | Plot Related Shipments.

I'm doing a search for view_shipment_order_release table, the information is displayed correctly, but the performance of the report is very slow.
Is there any table or view in which OTM can return this information?

Thank you

Query:

Code:

select a.shipment_xid SHIPMENT,
      nvl((select distinct (select distinct j.shipment_gid
                              from view_shipment_order_release j,
                                  shipment_refnum            k
                            where j.order_release_gid = l.order_release_gid
                              and k.shipment_gid = j.shipment_gid
                              and k.shipment_refnum_qual_gid =
                                  'YPE.SH_XDOCK'
                              and k.shipment_refnum_value = '1')
            from view_shipment_order_release l
            where l.shipment_gid = a.shipment_gid), a.shipment_gid) PRIMARY_SHIPMENT
from shipment a
where trunc(to_date(a.start_time, 'dd/mm/rrrr')) between
      trunc(to_date(:P_DT_1, 'dd/mm/rrrr')) and
      trunc(to_date(:P_DT_2, 'dd/mm/rrrr'))


Viewing all articles
Browse latest Browse all 2772

Trending Articles