Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Greeting for the Day...!!!
I have a requirement to find out the Main Filed and Sub field out of Hierarchy table.
Input Format:-
*A*B*C
*G*D
*U*F*J*K*L
*M*I*T*H*T*R*D*V
OutPut Table should be:-
Main Group | Sub Group | Last Group |
---|---|---|
A | B | C |
G | D | |
U | F | L |
U | J | L |
U | K | L |
M | I | v |
M | T | v |
M | H | v |
M | R | v |
M | D | v |
Please help me out to get the solution for this.
Thanks!
D J
Load SubField(Txt,'*',2) As MainGrp, If(Cnt>2,SubField(Txt,'*',3+(IterNo()-1))) As SubGrp, SubField(Txt,'*',Cnt+1) As LastGrp While IterNo() <= If(Cnt>2,Cnt-2,1);
LOad *,SubStringCount(Txt,'*') As Cnt Inline [
Txt
*A*B*C
*G*D
*U*F*J*K*L
*M*I*T*H*T*R*D*V ];
May be like attached qvw.
Load SubField(Txt,'*',2) As MainGrp, If(Cnt>2,SubField(Txt,'*',3+(IterNo()-1))) As SubGrp, SubField(Txt,'*',Cnt+1) As LastGrp While IterNo() <= If(Cnt>2,Cnt-2,1);
LOad *,SubStringCount(Txt,'*') As Cnt Inline [
Txt
*A*B*C
*G*D
*U*F*J*K*L
*M*I*T*H*T*R*D*V ];