EXECUTE
Description
The
EXECUTE
IMMEDIATE
statement builds and runs a dynamic SQL statement in a single operation.Native dynamic SQL uses the
EXECUTE
IMMEDIATE
statement to process most dynamic SQL statements. (Redshift Language Reference EXECUTE Statement)
Grammar Syntax
Sample Source Patterns
Concated Example
Input Code
Output Code
Function Transformation
Input Code
Output Code
Error In Query Parsing
Input Code
Output Code
INTO Clause
Input Code
Output Code
Known Issues
1. Execution results cannot be stored in variables.
SnowScripting does not support INTO nor BULK COLLECT INTO clauses. For this reason, results will need to be passed through other means.
2. Dynamic SQL Execution queries may be marked incorrectly as non-runnable.
In some scenarios there an execute statement may be commented regardless of being safe or non-safe to run so please take this into account:
Related EWIs
SSC-EWI-0027: Variable with invalid query.
SSC-EWI-0030: The statement below has usages of dynamic SQL.
Last updated