Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
janjirala
Contributor
Contributor

iterate in the same row for each column value and if it is matched choose one column value

hi Champs,

I have requirement

emp  emp_1  emp_2  emp_3  emp_4

1          5          4                1            -

2         6          5                4             3

if emp=emp3 then emp2 as manager

 

likwaise i need ti collect data fro each row

 

dat should like something 

emp mgr

1         4

3       4

 

please help.

 

2 Replies
rubenmarin

Hi, i'm not sure of the full requirements, can you post more sample data and expected result? why emp 3 should have mgr 4?

janjirala
Contributor
Contributor
Author

Thanks for response, please find my details:

Input:

EMPNOEMPNAMEEMP_G1EMP_G2EMP_G3EMP_G4EMP_G5EMP_G6 
1A654321 
4B654--- 
2C65432  
         

 

Output:

EMP_NAMEEMP_NOMGR_NO
A12
B45
C23

 

I have input table having empno and his mgr level hierarchy as emp_g1,g2...and so on.In the first record the emp_no=1 has hi slevel as G6 and his immediate manager as G5->G4->G3->G2->G1

No I want all empno and manager_no details like I shoe in output table.

In the output table it should contain all employees and his manager , so that I can get the correct hierarchy and apply the hierarchy function .

Hope this will  provide you some information.