MapInfo Pro

 View Only

@James Ward you asked regarding SQL Select Syntax

  • 1.  @James Ward you asked regarding SQL Select Syntax

    Posted 04-19-2019 02:52
    Question asked by James Ward
    In mapinfo pro 11.3 I am looking to use the SQL Select and extract total road lengths. I need to say use a table named 'highway' and then select from the different hierarchy of road (A, B, C, U) and then add up all the lengths from each section with total lengths. Do you have any ideal what type of syntax I could use within the 'where condition' box? Thank you for any assistance on this. I was going to post a message on the forum but I couldn't find anywhere to write a new post.


    For example: I have a fibre network route table (~ Highway Table referenced in question) and Type field (with records category as OFF_ROAD, ON_ROAD, RAILROAD ~ A, B, C road hierarchy mentioned in your mail). Now if I want sum lengths from each type field, syntax should be (TYPE, Sum(ObjectLen(obj, "ft")) under Select Columns: option) as illustrated below:
    Once the above SQL Select query is executed, the length of respective fibre network type  (or in your case road hierarchy) can be calculated.
    Note: Units can be changed under ObjectLen function.
    Hope this helps!

    - Thanks, Neena

    Dr Neena Priyanka
    Pitney Bowes Software India PVT. Ltd