Can someone help me in this.....
Table name-customer
Customerid custname flag parentid
1 A I 0
2 P I 0
3 B S 1
4 Y S 5
5 X I 0
6 z S 5
7 c S 1
8 R S 2
9 Q S 2
output should be like this:
parent and then its childs again parent and its childs
like these,parent1,child of parent 1,child of parent 1,parent 2,child of parent 2 ,child of parent 2
EXAMPLE :
Customerid custname flag parentid
1 A I 0
3 B S 1
7 c S 1
2 P I 0
8 R S 2
9 Q S 2
5 X I 0
4 Y S 5
6 z S 5
Thanks
Table name-customer
Customerid custname flag parentid
1 A I 0
2 P I 0
3 B S 1
4 Y S 5
5 X I 0
6 z S 5
7 c S 1
8 R S 2
9 Q S 2
output should be like this:
parent and then its childs again parent and its childs
like these,parent1,child of parent 1,child of parent 1,parent 2,child of parent 2 ,child of parent 2
EXAMPLE :
Customerid custname flag parentid
1 A I 0
3 B S 1
7 c S 1
2 P I 0
8 R S 2
9 Q S 2
5 X I 0
4 Y S 5
6 z S 5
Thanks