Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2008
    Posts
    4

    Unanswered: query for calculating 1/2 distance btwn 2 points (not spatial)

    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:

    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!
    Attached Thumbnails Attached Thumbnails mz_cl_poles.jpg   hv_span.jpg  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •