我从我的脚本中得到以下 oracle SQL 输出。
Status Item1 Item2 Item3 Item4
Processed 22 12 10 0
Error 11 22 0 0
Unsent 10 11 0 22
我想将行移动到列和列到行,并使用 PIVOT 和 UNPIVOT 在 SQL 中显示为以下格式。
Items Processed Error Unsent
Item1 22 11 10
Item2 12 22 11
Item3 10 0 0
Item4 0 0 22