Created
January 14, 2021 16:13
-
-
Save vmleon/cebf3304be6d5685caa615c1676f8552 to your computer and use it in GitHub Desktop.
Oracle Spatial Example: Warehouses and Branches, big query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
BRANCH_NAME, | |
ROUND(SDO_NN_DISTANCE(1), 2) DISTANCE_KM | |
FROM | |
BRANCHES B, | |
WAREHOUSES W | |
WHERE W.WAREHOUSE_NAME = 'Odessa Warehouse' | |
AND SDO_NN(B.GEOMETRY, W.GEOMETRY, 'sdo_num_res=5 unit=km', 1) = 'TRUE' | |
ORDER BY DISTANCE_KM; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment