MSCCP0011
Nested cursor inside query is not supported in Snowflake
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Medium
Description
This error is used to indicate that a cursor definition exists within a query. A cursor expression returns a nested cursor, a nested cursor is implicitly opened when the cursor expression is evaluated. For more information please refer to Oracle Cursor Expression.
Code example
Oracle
SELECT
category_id,
category_name,
CURSOR
(
SELECT
product_id,
product_name
||', '
||category_id
FROM
products e
WHERE
e.category_id = d.category_id
) EMP_CUR
FROM
categories d;SELECT
category_id,
category_name,
--** MSC-ERROR - MSCCP0011 - NESTED CURSOR INSIDE QUERY IS NOT SUPPORTED IN SNOWFLAKE. **
CURSOR
/*** MSC-ERROR - MSCCP0001 - THE FOLLOWING SUBQUERY MATCHES AT LEAST ONE OF THE PATTERNS CONSIDERED INVALID AND MAY PRODUCE COMPILATION ERRORS ***/
(
SELECT
product_id,
NVL(
product_name :: STRING, '') || ', ' || NVL(category_id :: STRING, '')
FROM
products e
WHERE
e.category_id = d.category_id
) EMP_CUR
FROM
categories d;Recommendations
If you need more support, you can email us at [email protected]
Last updated
