Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update TOP 100 records

Status
Not open for further replies.

M8KWR

Programmer
Aug 18, 2004
864
GB
is there a way to just update the top 100 records of a table with an update query.

The only way i can think of doing it is by creating a query that select the top 100 then cross reference this back against itself, and then update

But can it be done in one query...
 
Code:
UPDATE ...
WHERE keyID in 
(SELECT TOP 100 keyID FROM ...
ORDER BY ...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top