Limit to last record w/Edit

Megawisdumb

Registered User.
Local time
Today, 14:59
Joined
Apr 18, 2002
Messages
17
Anyone know a way to limit a query to a single record (last/first) and maintain the ability to edit a yes/no field with the query?? Sounds simple but I can't figure this one out.
 
If by last/first you mean the last() or first() function, you cannot edit anything because a total query is not updatable.

If what you mean is the first or the last record using SELECT TOP 1 with or without the Order By clause, it is updatable. But TOP 1 with Order By clause will return more than one record when there is a tie.

SELECT TOP 1 *
FROM yourTable
ORDER BY Fieldname DESC

will return the last record.
 
YES!

Works great! This was one of those easy sounding tasks that seemed to have difficult approach. Thanks for your assistance!
 

Users who are viewing this thread

Back
Top Bottom