Selection of Random Records 
Author Message
 Selection of Random Records
Hi,
Could someone out there in SQL land help me out on this one ?  How can I
select 50 random rows from a table containing 250 rows, or perhaps select
every Nth row ?
Thanks !


Sun, 18 Mar 2001 03:00:00 GMT
 Selection of Random Records

How about:

        --seed random number generator
        SET ROWCOUNT 50
        SELECT t.key, rand()
        FROM table t
        WHERE ...
        ORDER BY 2

Quote:

> ... How can I select 50 random rows from a table containing 250 rows

Scott David Daniels



Wed, 21 Mar 2001 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Random selection of records?

2. Random selection of records in PL/SQL

3. Random Record Selection

4. Random Record selection from recordset

5. Access: Random selection of records

6. Random selection of records

7. weighted random selection of record

8. Random record, display at random time

9. Random selection of rows in a query

10. SQL-->random selections

11. Random selection from table

12. "Random" selection


 
Powered by phpBB® Forum Software