Hi,
Below is the loop requirement .
Based on id and parent id , column new_pid need to be calculated . id can go upto thousands .
| id | code | parent id | new pid | 
| 1 | V01 | 0 | 0 | 
| 2 | V02 | 1 | V01 | 
| 3 | V03 | 2 | V01,V02 | 
| 4 | V04 | 5 | V03,V02 | 
| 5 | V05 | 3 | V01 | 
Any help is appreciated. Thanks.
@praneshsapmm 
Can you give more about the logic here?
It appears to be that for id 4 the new pid should be V05, V01, V02?
Hi @Qiu ,
The solution works beautifully for now . But the only challenge is the how the values are sorted in new_pid .
As the iterations increase at times , the sorting is not correct .
I mean first the values of lowest parentid need to be available followed by the later one in column new_pid . can you help .
Thanks .
@Nandakishore 
I think we can add one Sorting tool to resolve this issue.
 
					
				
				
			
		
