MSCEWI4006
The selection of the variable may have runtime errors.
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Low
Description
This warning is added when a transformation is being applied fo a SELECT @local_variable, and the assigned expression is referencing other local variables.
Code Examples
Input Code:
Output Code:
Input Code:
Output Code:
Recommendations
For example 1, notice that you are using an implicit
+=
operator, by adding the current variable value in each iteration. In the output code you should do only two changes:Remove the question mark and the bindings from the
EXEC
call.Modify the
VAR1_OPERATION
function, in order to sum all the values in each iteration when it is called. For example:
For example 2, notice that you are referencing
@VAR1
from the same statement inVAR2
. In this case, you can simply replace the@VAR1
reference with its expression assignment, in this casecol1 + col2
If you need more support, you can email us at snowconvert-support@snowflake.com
Last updated