Subscribe Bookmark RSS Feed

Join 2 tables of different data table and columns side by side for Fit Y-X

adam

Contributor

Joined:

Sep 20, 2017

Hi Guys,

Good day...

I have 2 tables that I would like to join it side by side, just like in Ms Excel whereby we can copy/paste easily the columns (from another table). I tried to join them but instead found that the nos. of rows has increase more than double instead remaining about the same. The data, except for the T_Type and Text_ID columns, they are all not really in sequential order. However since my intention is to do Fit Y by X for the measured parameters, I don't have to worry about the other categorical data. Just I do not understand how come the nos of rows in the new table can increase dramatically.

 

Appreciate that if anyone can help in finding out what is the correct method/way to use in this case and is there any script needed. Attached are the 2 tables file.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
adam

Contributor

Joined:

Sep 20, 2017

Solution

I guess the easiest way to do it is to rename the columns in 2nd data table and from 1st data table go to Table > Update(choose Selected) since in this case since my intention is to do Fit Y by X for the measured parameters regardless of T_Type, Text_ID, SerialNo, Head_No and Rad_ID matching or otherwise.

3 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

Step one is to identify which variable(s) in each of the two tables the whose values may be used to 'tie' the rows together (in the jargon of data modeling, to identify the 'primary key'). Note that 'Tables > Join' allows for a so-called 'composite' primary key, meaning that (if you join using 'by matching columns') you can use more than one column for this.

Given the names of the variables and looking quickly at the data, I might have expected that 'SERIALNO' would be used (maybe also with 'HEAD_NO' and/or 'RAD_ID'). But I noticed that there was no value of 'SERIAL_NO' common to the two tables you supplied. So I'm wondering if you uploaded the correct ones? If  the tables are correct, could you say more about which variable(s) make up the key?

adam

Contributor

Joined:

Sep 20, 2017

The variables that are common shall be T_Type, Text_ID, Head_No, Rad_ID and SW_ver. Yes, the SerialNo didn't have the commonality.
adam

Contributor

Joined:

Sep 20, 2017

Solution

I guess the easiest way to do it is to rename the columns in 2nd data table and from 1st data table go to Table > Update(choose Selected) since in this case since my intention is to do Fit Y by X for the measured parameters regardless of T_Type, Text_ID, SerialNo, Head_No and Rad_ID matching or otherwise.