Update Query

Update Query

Post by LHill » Thu, 01 Mar 2001 08:00:01



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. ??
 
 
 

Update Query

Post by Tibor Karasz » Fri, 02 Mar 2001 00:57:39


UPDATE tblname
SET colname = colname + ' appended text'
WHERE ...

--
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. ??

 
 
 

1. Update Query to update last date only

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
one.

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!)

Jeff

2. Run_Product problem

3. update multiple tables by using single update query

4. Urgent Must fill Oracle jobs

5. Automatically updating a timestamp upon UPDATE query?

6. Is SQL Server UNICODE compatible?

7. VB6,Access97,ADO - Update query doesn't update all records

8. BMP files from long-raw

9. UPDATE query not updating records

10. Update query with sub-query

11. Update query with sub-query (Newbie)

12. Update Query Times out on website but not through Query Analyzer

13. Update query using joined query as source