MapInfo Pro

  • 1.  Joining Temporary Tables

    Posted 02-26-2020 21:03

    Over the coming weeks, I'll write a #series of articles about the #SQL improvements we have made in MapInfo Pro v2019. This will, of course, look at the Select statement, we will get there eventually, but I'll also dive into the other improvements.

    In this article, I'll write about the improvement around joining temporary tables.

    Joining Temporary Tables

    In earlier versions of MapInfo Pro, you couldn't join a base table with a query, a temporary table. To do so you would have to save the query as a base table and then open the base table to use this in your Select statement.

    We have overcome this limitation in MapInfo Pro v2019.

    This means that you now can for example manually select one or multiple records from one layer and join these to another table to find relationships using either an alphanumerical or a spatial join.

    As an example, you might want to find the parcels that are affected by a specific planning zone. To find these parcels, you select the planning zone in question and run a query like this:

    Select *
    From Parcels As "p", Selection As "s"
    Where p.obj intersects s.obj
    Into Selection

    This can also be done in a different way in MapInfo Pro v2019: Select By Location. But behind the scenes, the query executed is similar to the one above and also using a join between a temporary table and a base table.

    The resulting Select statement from the Select By Location dialog looks like this:
    Select *
    From Parcels, Query6
    Where Parcels.obj Intersects Query6.obj
    Into Selection


    Have you tried using a query in a join? Can you see that you will benefit from this limitation being removed? What typical Select statements have you earlier tried to do with temporary tables?



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