Hi there, I am querying for the closest streetlight to a pole which is not mounted on the pole. This light has to have a coordinate location slightly offset from the pole coordinate location. Below is the query that I wrote. I want to know how I can specify that the distance has to be greater than zero. select sdo_nn_distance(1) dist, s.STREETLIGHT_IDENTIFIER, p.POLE_IDENTIFIER from pole p, streetlight s where s.construction_status = 'as constructed' and p.construction_status = 'as constructed' --and p.LOCATION_PT <> s.LOCATION_PT and sdo_nn(p.LOCATION_PT,s.LOCATION_PT,'sdo_num_res=1',1) = 'TRUE' order by dist; I hope this is clear. Can anyone help? thank you!