![]() |
|
Archives of the TeradataForumMessage Posted: Thu, 06 Dec 2012 @ 13:21:35 GMT
Hi James - use the SAMPLE function to generate a random sample of a fixed number of rows or a percentage of the rows. 1) Fixed Nbr:
Select *
From dbnm01.tblnm01
Sample 100000 --Selects 100000 rows from the answerset ;
2) Percentage
Select *
From dbnm01.tblnm01
Sample .10 --Express the percentage as a decimal ;
Since the result set is randomly selected, U are unable (well actually, almost never able) to duplicate the answer set by rerunning the query. Rgrds, Bill Gregg
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||