TheCrankyMule
New Member
- Joined
- Dec 20, 2018
- Messages
- 2
Hi All,
This may be an impossible task so bear with me. I have the following raw data:
[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD]Owner[/TD]
[TD]Account ID[/TD]
[TD]Industry[/TD]
[TD]Industry#[/TD]
[TD]Account #[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]1[/TD]
[TD]Plumber[/TD]
[TD]Primary Industry[/TD]
[TD]Primary Account[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]2[/TD]
[TD]HVAC[/TD]
[TD]Secondary Industry[/TD]
[TD]Secondary Account[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]3[/TD]
[TD]Plumber[/TD]
[TD]Primary Industry[/TD]
[TD]Primary Account[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]4[/TD]
[TD]Electrician[/TD]
[TD]Secondary Industry[/TD]
[TD]Secondary Account[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]5[/TD]
[TD]Construction[/TD]
[TD]Tertiary Industry[/TD]
[TD]Tertiary Account[/TD]
[/TR]
</tbody>[/TABLE]
Then I need to append it to this table:
[TABLE="class: grid, width: 900"]
<tbody>[TR]
[TD]Owner[/TD]
[TD]Primary Industry[/TD]
[TD]Secondary Industry[/TD]
[TD]Tertiary Industry[/TD]
[TD]Primary Account[/TD]
[TD]Secondary Account[/TD]
[TD]Tertiary Account[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So that it ends up looking like this:
[TABLE="class: grid, width: 900"]
<tbody>[TR]
[TD]Owner[/TD]
[TD]Primary Industry[/TD]
[TD]Secondary Industry[/TD]
[TD]Tertiary Industry[/TD]
[TD]Primary Account[/TD]
[TD]Secondary Account[/TD]
[TD]Tertiary Account[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Plumber[/TD]
[TD]HVAC[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Plumber[/TD]
[TD]Electrician[/TD]
[TD]Construction[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
I was thinking I could use an index match match, but I'm not able to make it work. Anyone have any solutions? Maybe I need to rearrange the data? It's tough, because I'm writing SQL to pull the raw data the way it is, so I'm a bit limited in how I pull it. Thanks so much for your help.
This may be an impossible task so bear with me. I have the following raw data:
[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD]Owner[/TD]
[TD]Account ID[/TD]
[TD]Industry[/TD]
[TD]Industry#[/TD]
[TD]Account #[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]1[/TD]
[TD]Plumber[/TD]
[TD]Primary Industry[/TD]
[TD]Primary Account[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]2[/TD]
[TD]HVAC[/TD]
[TD]Secondary Industry[/TD]
[TD]Secondary Account[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]3[/TD]
[TD]Plumber[/TD]
[TD]Primary Industry[/TD]
[TD]Primary Account[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]4[/TD]
[TD]Electrician[/TD]
[TD]Secondary Industry[/TD]
[TD]Secondary Account[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]5[/TD]
[TD]Construction[/TD]
[TD]Tertiary Industry[/TD]
[TD]Tertiary Account[/TD]
[/TR]
</tbody>[/TABLE]
Then I need to append it to this table:
[TABLE="class: grid, width: 900"]
<tbody>[TR]
[TD]Owner[/TD]
[TD]Primary Industry[/TD]
[TD]Secondary Industry[/TD]
[TD]Tertiary Industry[/TD]
[TD]Primary Account[/TD]
[TD]Secondary Account[/TD]
[TD]Tertiary Account[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
So that it ends up looking like this:
[TABLE="class: grid, width: 900"]
<tbody>[TR]
[TD]Owner[/TD]
[TD]Primary Industry[/TD]
[TD]Secondary Industry[/TD]
[TD]Tertiary Industry[/TD]
[TD]Primary Account[/TD]
[TD]Secondary Account[/TD]
[TD]Tertiary Account[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD]Plumber[/TD]
[TD]HVAC[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Plumber[/TD]
[TD]Electrician[/TD]
[TD]Construction[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
I was thinking I could use an index match match, but I'm not able to make it work. Anyone have any solutions? Maybe I need to rearrange the data? It's tough, because I'm writing SQL to pull the raw data the way it is, so I'm a bit limited in how I pull it. Thanks so much for your help.