cs3mw
02-17-2009, 04:04 PM
Hi, I am trying to generate a radom entry from a sequel server database.
I have four fields called entryID, name, department and quizID. What I would like to do is display a random entryID from the table. I have the following which is simply displaying the first entry.
SELECT TOP 1 entryID, [name] FROM PuzzleSubmit WHERE quizID='2' ORDER BY RAND()
Has anyone any ideas? Unfortunately I am used to working in a mysql environment so I do apoligise for asking such a simple question and this piece of work has to be demoed tomorrow otherwise I would have done more research.
Regards
Mike
I have four fields called entryID, name, department and quizID. What I would like to do is display a random entryID from the table. I have the following which is simply displaying the first entry.
SELECT TOP 1 entryID, [name] FROM PuzzleSubmit WHERE quizID='2' ORDER BY RAND()
Has anyone any ideas? Unfortunately I am used to working in a mysql environment so I do apoligise for asking such a simple question and this piece of work has to be demoed tomorrow otherwise I would have done more research.
Regards
Mike