Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have data like name, ID and MGR ID .
here based on MGR id display the MGR Name.
Could you please help on that.
Input:
EMP ID | Name | MGR ID |
1 | Ram | 2 |
2 | Raj | 4 |
3 | Rani | 2 |
4 | Ravi | 6 |
5 | Roja | 2 |
6 | Rajesh | 2 |
7 | Raghu | 2 |
8 | Ramyya | 6 |
9 | Radha | 6 |
10 | Rangha | 6 |
Required Out Put:
EMP ID | Name | MGR ID | MGR Name |
1 | Ram | 2 | Raj |
2 | Raj | 4 | Ravi |
3 | Rani | 2 | Raj |
4 | Ravi | 6 | Rajesh |
5 | Roja | 2 | Raj |
6 | Rajesh | 2 | Raj |
7 | Raghu | 2 | Raj |
8 | Ramyya | 6 | Rajesh |
9 | Radha | 6 | Rajesh |
10 | Rangha | 6 | Rajesh |
Thank you.
Ram
As below
Main:
Load * Inline [
EMPID,Name,MGRID
1,Ram,2
2,Raj,4
3,Rani,2
4,Ravi,6
5,Roja,2
6,Rajesh,2
7,Raghu,2
8,Ramyya,6
9,Radha,6
10,Rangha,6
];
Left Join(Main)
Load EMPID as MGRID,Name as MGRNAME
Resident Main;
As below
Main:
Load * Inline [
EMPID,Name,MGRID
1,Ram,2
2,Raj,4
3,Rani,2
4,Ravi,6
5,Roja,2
6,Rajesh,2
7,Raghu,2
8,Ramyya,6
9,Radha,6
10,Rangha,6
];
Left Join(Main)
Load EMPID as MGRID,Name as MGRNAME
Resident Main;
You can also explore
Hierarchy
HierarchyBelongsTo
Hi Vinieme,
It's working .
Thanks
Ram