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 2005 Forums
 Express Edition and Compact Edition (2005)
 Retrieving Same set of rows selected randomly

Author  Topic 

hariharans2001
Starting Member

1 Post

Posted - 2004-11-09 : 08:06:45
Hi All


by using this query

"select * from sample order by newid()" im getting a set of rows. On refreshing this query i need the same set of rows to validate.(provided sufficient data in the table).

Please provide me the query to use for this

Adv. Thanks
Hari...

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-11-09 : 16:21:44
Let me get this straight:

- You want a random set of rows
- You want to re-run the query and get the same set of rows (not random)

Random <> Non-Random


Let's just say it doesn't make sense. Why do you want the same set again??

Corey
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-11-09 : 16:40:16
put them into a temp table. then do whatever you need to the temp table.

- Jeff
Go to Top of Page
   

- Advertisement -