I have seen examples of using a Column value to update a single new column name, but not multiples.
Looking to pivot each instance of PLANTYPE to a prefix for the 3 associated columns
So the resulting Columns would be DENTAL_CANCELREASON, DENTAL_CANCELDATE, DENTAL_CANCELYEAR
This would repeat for each PLANTYPE
With 40+ PLANTYPE values, this would result in 120+ columns, most world be null()
resulting data needs to be grouped by the ID field, pivoting to 1 row per ID. Any help is appreciated
ID PLANTYPE CANCELREASON CANCELDATE CANCELYEAR
1 DENTAL Family Needs Changed 12/31/2020 2020
1 TERM_C2 Family Needs Changed 1/1/2024 2024
ID DENTAL_CANCELREASON DENTAL_CANCELDATE DENTAL_CANCELYEAR TERM_C2_CANCELREASON
1 Family Needs Changed 12/31/2020 2020 Family Needs Changed
TERM_C2_CANCELDATE TERM_C2_CANCELYEAR
1/1/2024 2024