Legal | Privacy
-- Finds the 5 closest customers to warehouse_id = 2

select /*+ordered*/ 
       c.customer_id, 
       c.cust_first_name, 
       c.cust_last_name
from warehouses w, 
       customers c
where w.warehouse_id = 2
and sdo_nn (c.cust_geo_location, w.wh_geo_location, 'sdo_num_res=5') = 'TRUE';
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy