Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
acaffarini
Contributor
Contributor

Joining two tables with differently named and derived keys

As I'm creating a new app, when Qlik Sense brings me to the part where I need to add data by selecting databases through an ODBC connector, I am looking to join two large tables without need for using Script Editor. The challenge is that when I select the two tables, the common key on which to join both is tables has a different name in each table. For example, in one table the key is simply called "id" (and is the primary key of that table). In another table it is called "customer_id," which serves the foreign key back to the first table. Both are character/text fields.

The other challenge is that the customer_id field contains three additional characters appended to it, so I need to trim off those last three characters to get it to match "id," so the equivalent of a substr() function is necessary before the two tables can be joined.

Is there a way to join these without using the Script Editor? 

Thank you. 

Labels (1)
1 Reply
Channa
Specialist III
Specialist III

try 

mid('abcdefdfrss', 2)

qlik default join based on common columns to avoid you can change columns name as Colsmn1 alias

 

 

Channa