Comment on page
MSCEWI1077
Cycle found between CTE calls. CTEs cannot be ordered.
Low
This warning is added when a query that has several CTE (Common Table Expression) reference calls creates a cycle that cannot determine the calling order of the CTEs, and then the CTEs cannot be ordered and the query will remain as the original source.
WITH t1(c1) as (SELECT c1 FROM t2),
t2(c2) as (SELECT c2 FROM t3),
RECURSIVE t3(c3) as (SELECT c3, someOtherColumn FROM t1, t3)
SELECT * FROM t1;
/*** MSC-WARNING - MSCEWI1077 - CYCLE FOUND BETWEEN CTE REFERENCE CALLS, CTES CANNOT BE ORDERED AND THE QUERY WILL REMAIN AS ORIGINAL ***/
WITH RECURSIVE t1(c1) AS
(
SELECT c1 FROM t2
),
t2(c2) AS
(
SELECT c2 FROM t3
),
t3(c3) AS
(
SELECT c3, someOtherColumn FROM t1, t3
)
SELECT * FROM t1;
- No additional user actions are required.