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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Express Edition and Compact Edition (2005)
 Retrieving Same set of rows selected randomly
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 11/09/2004 :  08:06:45  Show Profile  Send hariharans2001 an AOL message  Send hariharans2001 a Yahoo! Message  Reply with Quote
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

Flowing Fount of Yak Knowledge

2878 Posts

Posted - 11/09/2004 :  16:21:44  Show Profile  Visit Seventhnight's Homepage  Reply with Quote
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??


Edited by - Seventhnight on 11/09/2004 16:22:28
Go to Top of Page

Dr. Cross Join

7423 Posts

Posted - 11/09/2004 :  16:40:16  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
put them into a temp table. then do whatever you need to the temp table.

- Jeff
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000