MapInfo Pro

 View Only
  • 1.  SQL IN Operator?

    Employee
    Posted 02-20-2020 12:08
    Hello,

    I'm running MapInfoPro version 17.0  and I cannot figure out how to query for multiple values in a column.
    In typical SQL parlance the query would look something like this:

    SELECT column_name
    FROM table_name
    WHERE column_name IN (value1, value2, ...);

    I cannot find the IN Operator in MapInfoPro.  How then is this task accomplished?

    Also, I spent the better part of an hour searching online for the answer. Where can I find the answer to this or any MapInfoPro SQL question besides this forum?

    Thanks,
    Anthony

    ------------------------------
    Anthony Puckett
    Pitney Bowes
    White River Junction VT
    ------------------------------


  • 2.  RE: SQL IN Operator?

    Posted 02-20-2020 12:39
    Hi Anthony
    There is a good article here​ explaining
    https://community.pitneybowes.com/communities/community-home/digestviewer/viewthread?MessageKey=0d73f82b-e066-4309-80cd-a63c7c079d14&CommunityKey=fe4d1ee2-f1c6-4307-87d2-00bea1344885&tab=digestviewer#bm0d73f82b-e066-4309-80cd-a63c7c079d14

    ------------------------------
    John Ievers
    CDR Group
    Hope Valley, United Kingdom
    ------------------------------



  • 3.  RE: SQL IN Operator?

    Employee
    Posted 02-20-2020 13:29
    Thanks John, I just tried IN again an now it works. No idea why it wasn't before.  

    Is there some documentation on using SQL within MapInfo that anyone can point me to?

    ------------------------------
    Anthony Puckett
    Pitney Bowes
    White River Junction VT
    ------------------------------



  • 4.  RE: SQL IN Operator?

    Employee
    Posted 02-21-2020 02:34
    Hi Anthony

    First of all, I'd advise that you get hold of MapInfo Pro v2019. We have made some substantial improvements to the Select syntax as well as the SQL interface. Look for posts here on the Community using the #SQL tag to learn more about the recent improvements.

    For more information on using Select in MapInfo look in the Help system for Selecting and Querying Data. The MapInfo Pro User Guide has a similar chapter.



    ------------------------------
    Peter Horsbøll Møller
    Distinguished Engineer
    Pitney Bowes Software & Data
    ------------------------------