[GIS] Joining two tables by selection from one table in MapInfo

attribute-joinsmapinfosql

I have 2 MapInfo tables that have a corresponding unique ID number field.
I'd like to be able to manually select some objects from one table and join the 2 tables based on a matching unique ID number for the selected objects only.

Is this possible?

Best Answer

Yes, this is possible.

You do it like regular SQL, but use the MapInfo user interface.

Here's an example: http://web.pb.com/mapinfopro-sep-2012/Query-Ninja-Joining-Tables

And here's an image showing how (from the above URL).

Sourced from PitneyBowes website 2016

EDIT:

In order to achieve the result you're after, try these steps:

  1. First join the two tables together by selecting * for 'select columns' your two tables in the 'from tables' and setting table1.id = table2.id (where table and id are replaced by actual values) in the 'where condition' field.
  2. If step 1 works, you should see a table with all the info you're after and you can do a select from this table to get your 20 records.
  3. Once step 2 works, you may like to revisit step one to do it all in one go!