Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Random
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

kolucoms6
Average Member

845 Posts

Posted - 06 May 2007 :  16:03:27  Show Profile

How to retrieve randomly 4 records from Access database based on some criteria (it can result in 100 records , but just want to retrieve 4 randomly) ?

AnonJr
Moderator

United States
5768 Posts

Posted - 06 May 2007 :  20:52:23  Show Profile  Visit AnonJr's Homepage
There's some code for this floating around here already. Have a search, and if you can't find it I think I have it somewhere at work.
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 07 May 2007 :  05:50:27  Show Profile  Visit MarcelG's Homepage
Hey, I know this one!!! ORDER BY NEWID() in MS Access
SELECT TOP 4 RECORD 
FROM TABLE 
ORDER BY Rnd(-(1000*RECORD)*Time());

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

kolucoms6
Average Member

845 Posts

Posted - 07 May 2007 :  06:29:54  Show Profile
Cool Worked..
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07