Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Mar 2004 @ 19:21:25 GMT


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


Subj:   Re: Data Access with ODBC.NET
 
From:   dahmerj

In my experience, you cannot get the total number of rows that will be returned without first doing a COUNT(*) (or something similar), and then executing your query. So you would need 2 queries.

If you are trying to LIMIT the rows that you will bring back, you could tack on 'SAMPLE 1000000' to the end of your query, to be assured that you would not get back more than a million rows. You could then inform the user that 'More than 1,000,000 rows have been returned, please change your query parameters' or something similar. If your result is LESS than a million rows, the SAMPLE command won't matter.


Hope this may (somewhat) help,

Jason



     
  <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: 15 Jun 2023