Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 05 Jul 2005 @ 16:57:34 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: BTEQ-LIMIT and Oracle ROWNUM
 
From:   Clark, Dave

The BTEQ Command sequence:

     .SET RETLIMIT 10
     SEL * FROM DBC.Logonoff;

will limit the output to 10 rows but the DBS will still return all elements, so there can be a long delay before we return to the prompt. Typically, you want to use the RETCANCEL command along with RETLIMIT....

     .SET RETCANCEL ON
     .SET RETLIMIT 10
     SEL * FROM DBC.Logonoff;

This will cancel the request after the RETLIMIT value is exceeded.

The only time when you don't want to do this is if you are executing a multistatement request. In this case you will want to set RETCANCEL OFF (the default) to allow each statement to execute and process records up to the set limit.

Note that the minimum return is one row. You cannot eliminate output entirely with RETCANCEL.


-dave.clark



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016