Archives of the TeradataForum
Message Posted: Mon, 21 Apr 2003 @ 21:59:57 GMT
I hope everyone experienced a joy filled Easter.
The SAMPLE suggestion would absolutely return only 2000 rows. However, as mentioned, they are randomly selected. Not only that, but historically this function has been very slow, requiring all rows to be in SPOOL for the random selection to be implemented.
The original posting indicated, "The astute user wants to look at the first 2000 rows..."
So, I might suggest the RANK function. It can be set up with the QUALIFY to return the first 2000 rows in the sequence of the value(s) by the "Primary Key" and/or Primary Index in Teradata.
Try something like this:
Locking MyTable for access
Hope this helps.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|