Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 22 Jan 2002 @ 08:50:54 GMT


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


Subj:   Re: Setting the size of rows returned
 
From:   David Wellman

Robert,

There's no easy way to achieve this, but it can be done. As far as I'm aware there are basically two approaches that can be used. I think I'd probably use the second one.

1) for each 'request', issue the same sql and then get the client-side application to count the rows as they're returned. The first time through it retrieves and displays rows 1-500, when it's retrieved row #500 it ends the query and Teradata will discard the rest of the answer set. Second time through it retrieves rows 1-1000 and simply ignores the first 500 rows.

2) run the real 'business' query and insert the results into a temporary table, probably a volatile one. As part of this processing, add a unique sequence number to each row -- CSUM will do this -- and then issue queries against this temporary table selecting on the sequence number column to build your 500-row answer sets.

The downside to this is that you're potentially holding a lot of spool space until the application can release the temporary table. Having said that this is probably the only practical answer to your problem.


Cheers,

Dave

Ward Analytics Ltd: Information in motion (www.ward-analytics.com)



     
  <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