Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
Mattia
Creator II
Creator II

How to write an expression with Applymap if i have more than two table/sources

Hi QV users,

i've a problem with applymap.

i've three table, called table1, table2 and table3.

The key field between table1 and table2 is called key1, while the key field between table2 and table3 is called key2.

No one field link table1 and table3.

So, i need to link a field in table3 with table1.

How can i do it?

Thanks,

Mattia

Labels (2)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

I guess you could use double applymap.

MapA:

Mapping load Key1, Key2

From Table2;

MapB:

Mapping load Key2, YourField

From Table3;

 

Load *,

Applymap('MapB',Applymap('MapA', Key1)) as YourField

From Table1;

View solution in original post

2 Replies
Vegar
MVP
MVP

I guess you could use double applymap.

MapA:

Mapping load Key1, Key2

From Table2;

MapB:

Mapping load Key2, YourField

From Table3;

 

Load *,

Applymap('MapB',Applymap('MapA', Key1)) as YourField

From Table1;

Mattia
Creator II
Creator II
Author

Thank you so much, Vegar!
Your solution is perfect!!!

Mattia