I split one row from a table as below result
T;TDC;;;;;;009990972498000
D;AA209;;;ETX;;;;;;8058;0;
A;AA;080;;;;;;8058;0;
E;1;20150826
T;TDC;;;;;;009990972498000
D;DD102;;;ETX;;;;;;13428;0;
A;DD;080;;;;;;13428;0;
E;1;20150826
T;TDC;;;;;;009990972498000
D;DD405;;;ETX;;;;;;319;0;
A;DD;080;;;;;;319;0;
E;1;20150826
T is the header and E is the footer, D and A are details line.
Now that T and E are repetitive i wanted to eliminate duplicate headers and footers taking care of the existing order to have the result as follows;
T;TDC;;;;;;009990972498000
D;AA209;;;ETX;;;;;;8058;0;
A;AA;080;;;;;;8058;0;
D;DD102;;;ETX;;;;;;13428;0;
A;DD;080;;;;;;13428;0;
D;DD405;;;ETX;;;;;;319;0;
A;DD;080;;;;;;319;0;
E;1;20150826
Can somebody help?
I will appreciate