Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 22 Mar 2002 @ 09:38:05 GMT


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


Subj:   Re: Sample query
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, March 21, 2002 23:05 -->

If you are running out of SPOOL on SAMPLE and you are one release 4 you might use the RAMDOM function.

Sel * from table
where RANDOM(1,100) = 1;

This will only select rows when the random number generator returns a value of 1. This should be roughly 1% of the time. Then, if you needed a specific number of rows, combine the RANDOM with the SAMPLE. It will use less SPOOL and give you a random sample.



     
  <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