Error 921

"Invalid recursive query"

Item Description

SQLCode

-921L

Constant

INVALID_RECURSION

SQLState

42W99

ODBC 2 State

37000

ODBC 3 State

42000

Sybase Error Code

2586

Severity Code

16

Probable cause

A recursive query must consist of the UNION ALL of an initial query and an iteration query. The only set operation allowed in the iteration query is UNION ALL. A recursive reference to the name of the common table expression can only appear in the iteration query, and must not be in a SELECT that uses DISTINCT, ORDER BY, or an aggregate function. A recursive reference also cannot appear on the NULL-supplying side of an outer join, or in a subquery.


Created May 6, 2011. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com