Pivot/transpose data
Posted: Sat Oct 18, 2008 9:54 pm
I have data like this in ascii Text format :
SrNo.1 Name1 Name 2 Address1 Data1 data 2
Address2
Address3
Address4
Address5
Address6
SrNo.2 Name1 Name 2 Address1 Data1 data 2
Address2
Address3
Address4
Address5
Address6
SrNo.3 Name1 Name 2 Address1 Data1 data 2
Address2
Address3
Address4
Address5
Address6
The address rows sometime varies from 6 to 8
I want all the addresses from Adress2 to 6 in the same data row which has name1, name2, address1,Data1 & data2
i.e i want it as follows:
SrNo.1 Name1 Name 2 Address1 Address2 Address3 Address4 Address5 Address6 Data1 data 2
SrNo.2 Name1 Name 2 Address1 Address2 Address3 Address4 Address5 Address6 Data1 data 2
SrNo.3 Name1 Name 2 Address1 Address2 Address3 Address4 Address5 Address6 Data1 data 2
Thanks
SrNo.1 Name1 Name 2 Address1 Data1 data 2
Address2
Address3
Address4
Address5
Address6
SrNo.2 Name1 Name 2 Address1 Data1 data 2
Address2
Address3
Address4
Address5
Address6
SrNo.3 Name1 Name 2 Address1 Data1 data 2
Address2
Address3
Address4
Address5
Address6
The address rows sometime varies from 6 to 8
I want all the addresses from Adress2 to 6 in the same data row which has name1, name2, address1,Data1 & data2
i.e i want it as follows:
SrNo.1 Name1 Name 2 Address1 Address2 Address3 Address4 Address5 Address6 Data1 data 2
SrNo.2 Name1 Name 2 Address1 Address2 Address3 Address4 Address5 Address6 Data1 data 2
SrNo.3 Name1 Name 2 Address1 Address2 Address3 Address4 Address5 Address6 Data1 data 2
Thanks