17.10 - Example - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1145-171K
Language
English (United States)

In the following example, the condition in the RESET WHEN clause contains SELECT as a nested subquery. This is not allowed and results in an error.

   SELECT SUM(a1) OVER
        (ORDER BY 1
         RESET WHEN 1 in (SELECT 1))
   FROM t1;
   $
   *** Failure 3706 Syntax error: SELECT clause not supported in
   RESET...WHEN clause.