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

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qtb1554762060450.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

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.