根据this teradata v14.0支持多个公用表表达式。所以简化的脚本如下:
WITH CTE1 AS
(
SELECT
X
FROM SomeTable
)
,CTE2 AS
(
SELECT top 10 X FROM CTE1
)
SELECT * FROM CTE2
应该有效。不幸的是,我得到了:
Object 'CTE1' does not exist.
有什么想法吗?