当向 10g Oracle 数据库发出以下查询时:
SELECT * FROM (
SELECT T1.ID, T2.ACCT_NO, ROW_NUMBER() OVER (PARTITION BY T1.ID ORDER BY T1.ID DESC) AS RRRRRRR
FROM TABLE1 T1
INNER JOIN TABLE T2 ON T1.ID = T2.ID
WHERE T1.ID = 666
)
PIVOT (MIN(T1.ID) AS ALIAS1 FOR RRRRRRR IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
我收到“命令未正确结束”错误。我搜索了 Oracle 数据透视示例,它们几乎都显示了相同的示例。我在这里想念什么?