1

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?

1 Answer 1

3

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!
3
  • Thank you Alex, I'm struggling to apply this methodology to my query though. I'll provide a little more detail. Table A and Table B have objects with a matching unique ID number. Table A contains 100 records with owner and address information. Table B contains 50 records with a property ID number. I want to select for example 20 records from Table B and join the 20 selected records to the 20 matching records in Table A. The result would be a table with 20 records containing the owner & address records from Table A and the property ID number from Table B.
    – Craig T
    Nov 9, 2016 at 21:42
  • You can definitely do this, @CraigT. I don't have a copy of MapInfo currently, so I can't work the example fully. You can do it in stages, though, which should be easy. I'll edit my answer with a suggestion.
    – Alex Leith
    Nov 9, 2016 at 22:46
  • This works perfectly Alex, appreciate your assistance.
    – Craig T
    Nov 10, 2016 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.