Wednesday, 11 October 2017

To Find the Organization Based on Order Number

SELECT   *
    FROM oe_order_headers_all
   WHERE order_number = '10000407'
ORDER BY creation_date DESC;  --ORG iD 9025


SELECT *
  FROM apps.org_organization_definitions
 WHERE operating_unit IN (SELECT organization_id
                            FROM hr_operating_units

                           WHERE organization_id = 9025)