|
|
Archives of the TeradataForum
Message Posted: Thu, 30 Jun 2005 @ 05:13:52 GMT
Subj: | | Re: How to delete selectively |
|
From: | | Dieter Noeth |
Glenn David McCall wrote:
| If you truly want to delete 50 rows at random, you will need to create another table with the key values of the 50 randomly selected
rows. | |
Or simply use a subquery, but this results in a 3706 "sample not allowed in subqueries".
But it'a allowed within a derived table :-)
Delete from some_table
Where (col1, col2, col3) in
(select *
from
(Select col1, col2, col3
From some_table
Sample 50) dt
);
Dieter
| |