Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 01 Jul 2003 @ 10:22:23 GMT


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


Subj:   Re: How to fetch specific number of rows
 
From:   McCann, Andy

My mistake, I was thinking off the top of my head when typing the mail (which is syntactically incorrect - just like some of the manual examples!)

Looking back at the documentation sent out when we hit this issue, the recommendation was that SAMPLE should only be used for getting back example rows with no other conditions. As you rightly state, volatile/temp tables are the only way around this and have the advantage of solving the RI problems that a straight sample causes. So in my example, the subquery is replaced by a select from the temp table. The PI driving of sample is still valid though.

You cannot seem to do this at all using derived tables, I've tried a few examples to force it but it won't play ball. As you state, it always applies the full query first then the sampling which is not ideal. We looked at this as an option for a sample area rather than another physical copy but came to the conclusion that it would not be suitable for exactly these reasons. It would be good if the functionality of sample could be expanded to sample source tables first....any NCR guys out there think this is a good idea?

Apologies for any confusion in the original mail, must remember to answer these mails later in the day when I've woke up. Personally, I still use MOD!


Cheers

Andy



     
  <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