Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 percent

Author  Topic 

sardinka
Posting Yak Master

142 Posts

Posted - 2004-10-21 : 14:08:48
I have the following query where I am selecting the random row. However I need to select 10% randon rows from the tables. How do I do this?
select top 1 *
from table
ORDER BY NEWID()

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2004-10-21 : 14:17:09
select top 10 percent

rockmoose
/* Chaos is the nature of things...Order is a lesser state of chaos */
Go to Top of Page
   

- Advertisement -