How do I select the next closest received date from table2 relative to the requested date in table 1? Included the desired result at the end. I am using Oracle SQL.
Table1:
PO RequestedDate
14888 01/12/2018
14733 02/12/2018
14555 05/12/2018
Table2:
PO ReceivedDate
14888 01/11/2018
14888 01/14/2018
14733 2/11/2018
14733 2/12/2018
14555 07/23/2018
14555 09/23/2018
Expected Result:
PO RequestedDate NearestReceivedDate
14888 01/12/2018 01/14/2018
14733 02/12/2018 02/12/2018
14555 05/12/2018 07/23/2018