Calculating the Distance Between Points
I did the following :
insert into testgis values (1,sdo_geometry(2001,null,sdo_point_type (-85.335871,35.412591,null), null, null));
insert into testgis values (2,sdo_geometry(2001,null,sdo_point_type (-85.592933,35.113892,null), null, null));
commit;
insert into user_sdo_geom_metadata('testgis','LOC',mdsys.sdo_dim_array(mdsys.sdo_dim_element('Longitude',-180,180,3),mdsys.sdo_dim_element('Latitude',-90,90,3));
commit;
select sdo_geom.sdo_distance(a.loc, b.loc, .005,'UNIT=FOOT') from testgis a, testgis b where a.id = 1 and b.id = 2;
I get
0ra-13293 : cannot specify unit for geometry without a goereferenced SRID