Hi all
Hoping someone may be able to help something I'm stumped on.
We have a hierarchy file where the core data comes in a pipe delimited cell like below.
network_CAR|subnetwork_GARAGE|subnetwork_DEALER|KMBINDIA|KMBINDIA_1|KMBINDIA_2|KMBINDIA_3
I need something that takes this and outputs like the below
[TABLE="width: 500"]
<tbody>[TR]
[TD]network[/TD]
[TD]subnetwork[/TD]
[TD]location[/TD]
[/TR]
[TR]
[TD]CAR[/TD]
[TD]GARAGE|DEALER[/TD]
[TD]KMBINDIA|KMBINDIA_1|KMBINDIA_2|KMBINDIA_3[/TD]
[/TR]
</tbody>[/TABLE]
Everything other than 'location' codes is proceeded by columnname_XXX i.e. 'network_xxx' means Network is the name of the column and everything after the underscore is the value
Where the 'columnname' is repeated more than once it should only create one column for that name and then pipe-delimit all values referenced as in the subnetwork 'GARAGE|DEALER' example
Each row isn't necessarily consistent in what values it has either, some may skip the Subnetwork_XXX and just have Network_xxx & location values for example
Feels like I'm asking a potentially impossible task but wanted to check for sure.
Any help much appreciated!
Thanks
Hoping someone may be able to help something I'm stumped on.
We have a hierarchy file where the core data comes in a pipe delimited cell like below.
network_CAR|subnetwork_GARAGE|subnetwork_DEALER|KMBINDIA|KMBINDIA_1|KMBINDIA_2|KMBINDIA_3
I need something that takes this and outputs like the below
[TABLE="width: 500"]
<tbody>[TR]
[TD]network[/TD]
[TD]subnetwork[/TD]
[TD]location[/TD]
[/TR]
[TR]
[TD]CAR[/TD]
[TD]GARAGE|DEALER[/TD]
[TD]KMBINDIA|KMBINDIA_1|KMBINDIA_2|KMBINDIA_3[/TD]
[/TR]
</tbody>[/TABLE]
Everything other than 'location' codes is proceeded by columnname_XXX i.e. 'network_xxx' means Network is the name of the column and everything after the underscore is the value
Where the 'columnname' is repeated more than once it should only create one column for that name and then pipe-delimit all values referenced as in the subnetwork 'GARAGE|DEALER' example
Each row isn't necessarily consistent in what values it has either, some may skip the Subnetwork_XXX and just have Network_xxx & location values for example
Feels like I'm asking a potentially impossible task but wanted to check for sure.
Any help much appreciated!
Thanks