Archives of the TeradataForum
Message 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 ;
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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|