Here is an option to do it natively in SSIS: https://www.sqlshack.com/an-overview-of-ssis-pivot-and-ssis-unpivot-transformation/ You could also stage the data and do it in SQL with a similar operation
– Mark WojciechowiczMay 25 '21 at 14:32
As you've tagged DB2 - two examples of Pivot on DB2 https://stackoverflow.com/questions/13579143/how-can-i-pivot-a-table-in-db2 & https://stackoverflow.com/q/15529107/181965
– billinkcMay 25 '21 at 14:54
Does this answer your question? [Pivoting in DB2](https://stackoverflow.com/questions/15529107/pivoting-in-db2)
– June7May 25 '21 at 18:43