Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
ENTHU
Level III

Joining tables with different column lengths

Hi,

 

I have 2 tables say A and B. Table has a number columns including name.Table A has 10 names.Table B is a referencelist which has 1000 names and corresponding ages. Is there a way to join the 2 tables so that the new joined table has only 10 names from Table A and respective ages from Table B?

when I tried this , got an error saying columns do not match.

 

TIA 

4 REPLIES 4
Highlighted
txnelson
Super User

Re: Joining tables with different column lengths

Tables==>Join

will do exactly this.  Just select the columns you want to match on, and then select to "Include non-matches" for the main table(your table with 10 names).  The resulting table will have only your 10 names.

join.PNG

Jim
Highlighted
ENTHU
Level III

Re: Joining tables with different column lengths

This works! Thanks for the quick reply.

But the joined table now has 2 columns named as age.Is there a way to retain only one?

Highlighted
txnelson
Super User

Re: Joining tables with different column lengths

If you look at my last response, you will see that one of the selections I made on the Dialog for the Join Platform, is called "Merge same name columns".  This will match names.

If you open up the Tables==>Join dialog, you can click on the "Help" button and it will display information about all of the selections and settings availabel to the platform.  You need to familiarize yourself with the Help environment.  It is a very quick and easy way to learn all about any of the platforms.

 

Jim
ENTHU
Level III

Re: Joining tables with different column lengths

Thanks. I had made right selections.But the problem was one table had column name Age and another age.

Article Labels

    There are no labels assigned to this post.