Example: Non-Support for Iterated Requests with TOP n - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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;

Result:

     *** 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.