SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

hariharans2001
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
Hari...

Seventhnight
Flowing Fount of Yak Knowledge

USA
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??

Corey

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

jsmith8858
Dr. Cross Join

USA
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  
 New 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.11 seconds. Powered By: Snitz Forums 2000