Case Expression Restrictions
In addition to the restrictions on value expressions listed in
Restrictions on Using a Value Expression, the use of a CASE expression in a select list has the following additional restrictions:
- CASE expressions cannot contain functions that use the DISTINCT keyword.
- All resulting values of the CASE expression must be of the same data type. The resulting data types are not evaluated until the query is executed. Therefore, it is possible that a bad SELECT statement can be created, which later causes an exception to be returned after executing the query.
- CASE expressions that contain subexpressions are parsed, but do not return an error.
Error Code = Resource limit reached Description = SQL parser stack overflow
Copyright © Cloud Software Group, Inc. All rights reserved.