My source data has 3 columns:
This is an example of how my source data looks based on one id:
id | value | gid |
5555555 | Cookies | pastry |
5555555 | Daniel | chef |
I want to create 2 new fields based on this source data:
Here is the logic I want to use to create these fields:
This is how my output data is looking now:
id | value | gid | pastry type | chef name |
5555555 | Cookies | pastry | Cookies |
|
5555555 | Daniel | chef |
| Daniel |
My goal is to compress these two records into one record so it looks like this:
id | value | gid | pastry type | chef name |
5555555 | Cookies | pastry | Cookies | Daniel |
The only fields I need in the output data are these:
id | pastry type | chef name |
5555555 | Cookies | Daniel |
What's the best way to do this? I know I can join back to the source table multiple times to get this result but I am trying to avoid that.
Thank you
Solved! Go to Solution.
Hi @iudogie,
It seems like the required output has [gid] as the column headers and the [value] are their respective values.
You can:
Please see attached my suggested solution.
Hope it helps.
Cheers,
Lelia
Thank you! This was very helpful!