Parmanand
Parmanand

Reputation: 355

How to fetch geometry points (latitude and longitude) in oracle database

I want to fetch my latitude and longitude from table in Oracle:

column name: GEO_LOCATION (type SDO_GEOMETRY)

table name: LOCATION_DATA

Record: MDSYS.SDO_GEOMETRY(2001,8307,MDSYS.SDO_POINT_TYPE(latitude ,longitude ,0),null,null)

Upvotes: 0

Views: 3660

Answers (1)

Rene
Rene

Reputation: 10541

You can acccess the lat/long values with the following query:

select table_alias.geo_location.sdo_point.x as longitude,
       table_alias.geo_location.sdo_point.y as latitude
from yourtable table_alias      

Upvotes: 1

Related Questions