【发布时间】:2019-10-02 18:00:47
【问题描述】:
我从我的脚本中得到以下 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
【问题讨论】: