I have a table called 'MovieDatabase' which lists all of my movies, i am trying to create a query that when run selects a random film from the list.
The query i have set up does select a different movie each time i run it but the problem is after i close the database down. When i re-open the database and run the query it selects the same movies.
e.g. i open the database and run the query three times, my results are
death proof
bowfinger
the davinci code
I close the database, open it again and run the query another three times, my results are
death proof
bowfinger
the davinci code
The SQL for my query is:
ID is my primary key
Does anyone have any idea's how i can overcome this?
The query i have set up does select a different movie each time i run it but the problem is after i close the database down. When i re-open the database and run the query it selects the same movies.
e.g. i open the database and run the query three times, my results are
death proof
bowfinger
the davinci code
I close the database, open it again and run the query another three times, my results are
death proof
bowfinger
the davinci code
The SQL for my query is:
Code:
SELECT TOP 1 MovieDatabase.title
FROM MovieDatabase
ORDER BY Rnd(Rnd(ID)) DESC;
ID is my primary key
Does anyone have any idea's how i can overcome this?