I am using Oracle Spatial on Oracle 8.1.7 . I have a table where location are stored with their lat/long (SDO_POINT_TYPE) and have to query for locations within say 100km of a give location. We can use SDO_WITHIN_DISTANCE but according to the documentaion that only checks in eucledian distance. How do I do it specifically in km or miles?
Since u r using 8.1.7 version, check wether it supports R tree indexing. If it supports R Tree indexing then u can find the distance in kms or miles with specifying a desired unit of measurement in the parameters (unit = KM/miles) through SDO_WITHIN_DISTANCE. Before going for it u have to index the data with R tree option where the parameter will be 'geodetic = true' (default for R tree indexing).