SELECT BA_VIEW_SHIPPING_ORDERS.SM_NUMBER, BA_VIEW_SHIPPING_ORDERS.STATUS AS SM_STATUS, BA_VIEW_SHIPPING_ORDERS.ORDER_TYPE,
BA_VIEW_SHIPPING_ORDERS.ORDER_NUMBER, DEPARTMENT.DEPT_NAME, BA_VIEW_SHIPPING_ORDERS.PN,
BA_VIEW_SHIPPING_ORDERS.DESCRIPTION, BA_VIEW_SHIPPING_ORDERS.SHIP_NAME AS CUSTOMER_NAME,
BA_VIEW_SHIPPING_ORDERS.SHIP_VIA_CODE, (CASE WHEN BA_VIEW_WO_SUMMARY.CONTRACT_TAT IS NULL
THEN 21 ELSE BA_VIEW_WO_SUMMARY.CONTRACT_TAT END-BA_VIEW_WO_SUMMARY.NET_TAT) WO_DAYS_LEFT, (SELECT BA_VIEW_SHIPPING_ORDERS.DUE_DATE-SYSDATE) SO_DAYS_LEFT,
(SELECT sysdate-BA_VIEW_SHIPPING_ORDERS.ENTRY_DATE WHERE ORDER_TYPE = 'RO') RO_DAYS_LEFT, (SELECT SYSDATE-BA_VIEW_SHIPPING_ORDERS.ENTRY_DATE WHERE ORDER_TYPE = 'WHS') WHS_DAYS_LEFT
FROM BA_VIEW_SHIPPING_ORDERS LEFT OUTER JOIN
BA_VIEW_WO_SUMMARY ON BA_VIEW_SHIPPING_ORDERS.ORDER_NUMBER = BA_VIEW_WO_SUMMARY.WO_NUMBER LEFT OUTER JOIN
DEPARTMENT ON BA_VIEW_SHIPPING_ORDERS.DPT_AUTO_KEY = DEPARTMENT.DPT_AUTO_KEY
WHERE BA_VIEW_SHIPPING_ORDERS.SM_NUMBER LIKE 'SHA%' AND (BA_VIEW_SHIPPING_ORDERS.STATUS NOT IN ('SHIPPED', 'CANCELLED')
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Expert of the Year award recognizes an expert who helped improve Experts Exchange in the past year through high levels of contributions and participation on site. This award is given to the expert who has achieved the highest levels of participation, while maintaining quality contributions and professionalism.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.