Updating 10 Random Records in a Table.

vrk1

Registered User.
Local time
Today, 00:29
Joined
Nov 18, 2004
Messages
10
Hi,

I have following query that takes 10 random records from one table (tblaccounts) and inserts that into another table (tblrandom).

SELECT TOP 10 tblaccount.*, Rnd([accnum]) AS Randnumber INTO tblRandom FROM tblaccount ORDER BY Rnd([accnum])

The above query works fine for that purpose.

However, I want to just update 10 Random records in tblaccount to set the following field:

SET status = "Assigned"

Does anyone know how to do this using an update statement please? Thanks!
 

Users who are viewing this thread

Back
Top Bottom