Implicit Cursor attribute helper

An implicit cursor has attributes that return information about the most recently run SELECT or DML statement. This section explains how this is being emulated using JavaScript.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Overview

These are the attributes that you can use inside Snowflake stored procedures using this helper:

  • FOUND

  • NOTFOUND

  • ROWCOUNT

  • ISOPEN

In Snowflake code, inside the procedures, you will find the initialization of these attributes:

 var SQL = {
  FOUND : false,
  NOTFOUND : false,
  ROWCOUNT : 0,
  ISOPEN : false
 };

The values of the attributes: FOUND, NOTFOUND, ROWCOUNT are updated inside the EXEC helper.

The attribute ISOPEN is always false, just like in Oracle.

Usage Samples

Input

Output

SQLCODE and SQLERRM are converted into helper variables with the same name and are bound in the same way as the cursor variables.

Known Issues

No issues were found.

No related EWIs.

Last updated