17.05 - Example: Non-Support for Iterated Requests With TOP n - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)

The following request indicates the lack of support for specifying a TOP n value as a parameterized variable in a USING request modifier for iterated arrays.

     .REPEAT 1 PACK 5
     BTEQ -- Enter your DBC/SQL request or BTEQ command:

     USING (a INTEGER, b INTEGER, c INTEGER)
     SELECT TOP :a *
     FROM t1;

     *** Starting Row 0 at Tue Aug 05 11:46:07 2008
     *** Failure 6906Iterated request:Disallowed statement type (TOP N).
   Statement# 1, Info =0
     *** Total elapsed time was 1 second.