How would I update a Text Field or a Numeric Text Field from the last row of a table?
Assuming you have a key field that can provide you the proper index, have you given a SELECT TOP 1 FROM query and used the ORDER BY and DESC (descending) options?
thats my shot at your question…Let me know if that helps,
thanks
t.
Hello,
tsimmons’s answer was right-on. The only thing I’d add is that the syntax for a row limiting clause (like “TOP 1”) varies from database to database. For instance, in MS Sql Server, the query would be (as suggested):
SELECT TOP 1 MyValue FROM MyTable ORDER BY t_stamp DESC
Whereas for MySQL it would be:
SELECT MyValue FROM MyTable ORDER BY t_stamp DESC LIMIT 1
Just for reference, www.sqlzoo.net is a great reference for learning SQL as well as lookup up syntax differences between databases.
Hope this helps,