Hello, I am trying to write a query which will give me a buffer 1/2 the size of the actual distance between two points. This is not a spatial query as the distance is already in one of the tables as an attribute. Below is the query I've written so far but it doesnt work yet: Code (SQL): SELECT m.rwo_key_id,MIN(buffer_size)buffer_size FROM (SELECT m.rwo_key_id, CASE WHEN MIN(p.route_length)/2<100 THEN urban ELSE MIN(p.route_length)/2 rural END buffer_size FROM hv_span@na_to_sorepview p, mz_cl_poles m WHERE p.construction_status = 'as constructed' AND (p.pole_1 = m.rwo_key_id OR p.pole_2 = m.rwo_key_id)) GROUP BY p.rwo_key_id; I've also included screen dumps of the tables i'm querying. Can someone help?? thank you!