CASE
Last updated
Last updated
The
CASE
statement in Redshift lets you return values based on conditions, enabling conditional logic in queries. It has two forms: simple and searched. ().
A simple CASE statement provides conditional execution based on equality of operands.
Simple Case are fully supported by .
In Redshift, when a CASE
expression is executed and none of the validated conditions are met, and there is no ELSE
defined, the exception 'CASE NOT FOUND' is triggered. In Snowflake, the code executes but returns no result. To maintain the same functionality in Snowflake in this scenario, an exception with the same name will be declared and executed if none of the CASE
conditions are met.
There are no known issues.
There are no related EWIs.
Searched Case are fully supported by .
Case Without Else are fully supported by .