Tuesday, 20 August 2013

Select Record from database randomly based on time

Select Record from database randomly based on time

I want to select records from database randomly based on time.
example I have table with name Table1 having thousand of records, now
every hour i want to display around 100 questions hourly but for every
hour they should be random. How can achieve it.
I dont want to create a separate table which 100 of columns and store
record Id of master table , instead i want to use some logic where i will
pass date and time and i can get 100 questions for that hours.
I am using sqlserver 2005.
I will be very thankfull, if any one can help me in solving this problem.

No comments:

Post a Comment