Archives of the TeradataForum
Message Posted: Fri, 22 Mar 2002 @ 09:38:05 GMT
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.
|