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
 General SQL Server Forums
 New to SQL Server Programming
 Select random records in sqlserve in terms of time

Author  Topic 

emad11
Starting Member

1 Post

Posted - 2010-08-31 : 06:42:16
Hello,
i have a query that select random records in access database in terms of time : "SELECT * FROM Tbl ORDER BY Rnd(-10000000*TimeValue(Now())*[ID])"

now i wish to convert this query for using in sql server 2005 such that return random records in term of time

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-08-31 : 06:50:42
Maybe this is what you want:
http://www.sqlteam.com/article/using-newid-to-randomly-sort-records


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -