cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Aam_jmp
Level IV

Joining tables

I have to join two tables  using jsl. The first table looks like this:

Example 1.PNG 

However, the second table can either be like this:

 

 Example2.PNG

In this table, Pred Form Molecule 1 (%)(2) is the same as Molecule 1(%) and the numbers in the value column are repeated. How can I specify the join to only consider one of those values?

 

The second table to join can look like this:

Example3.PNG

 

In this case, how can I specify in the join that Molecule 1 (%) in the first table is the same as Pred Form Molecule1 (%)(2) in the table that needs to be joined. 

The final table that I need should be something like this:

Example4.PNG 

Thank you for any help.

13 REPLIES 13
txnelson
Super User

Re: Joining tables

You can use the Search(Find) dialog to change column names, or parts of column names

find.PNG

Jim
uday_guntupalli
Level VIII

Re: Joining tables

@txnelson & @pmroz
     If I may, I would like to ask one question, why would you recommend column names be recoded / renamed given the table structure?  The current structure of the table shared shows that the data is in the rows. While I understand, that one can always transpose the data and rename columns, wondering if that is the approach you are recommending ? Please advice 

Best
Uday
pmroz
Super User

Re: Joining tables

I was suggesting recode to change values in a column, not change the name of the column.  To use the recode option, highlight the column you wish to recode, and click on Cols > Utilities > Recode (v12) or Cols > Recode (v13).

uday_guntupalli
Level VIII

Re: Joining tables

@pmroz
    Thank you for clarifying. My bad, was wondering if there was a better way to approach this that I was missing. 


@pmrozwrote:

I was suggesting recode to change values in a column, not change the name of the column.  To use the recode option, highlight the column you wish to recode, and click on Cols > Utilities > Recode (v12) or Cols > Recode (v13).


 

Best
Uday