Below is a table in databasse.
A is main item . aas,asd and ads is sub item of A
B is main item . byw and bmw is sub item of A
____Main Item_____|________Sub Item_______
A | aas
A | asd
A | ads
B | byw
B | bmw
I need to display like these. It will added SEQ_NO column..
____Main Item_____|_____SEQ_NO___|____Sub Item_______
A | 1 | aas
A | 2 | asd
A | 3 | ads
B | 1 | byw
B | 2 | bmw
I use sql server.
asdcomes afteraas, but beforeads?