Tibor Karaszi, SQL Server MVP
FAQ from Neil at: http://www.sqlserverfaq.com
Please reply to the newsgroup only, not by email.
Is there any way to do an update query or any query that will append to existing
data in the field instead of overwriting it. ??
I have a table with thousands of test scores:
StudentID, Score, TestDate
I have now added a column "Active" to this table and I need to update the
table and mark the Active column as True for the LAST test any given
StudentID took. For the most part, there is only one test score in the
table for a given Student but there are a thousand or so where the Student
has multiple tests and I need to flag Active as "False" for all but the last
I know how to do this by iterating through the table but I was hoping there
was a Set based way to do this as well (there usually is!)