Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 avoiding cursors

Author  Topic 

ccrespo
Yak Posting Veteran

59 Posts

Posted - 2007-07-30 : 13:27:11
hi i was wondering if there was a way to update a field as an addition and not as a replace, eg:
update table set field1 = 'static text' + field1
this can easily be done with cursors but i think it would be faster if I didn't use them

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-07-30 : 13:31:45
yes you had the right syntax. Make sure there is a WHERE clause if you did not want to update the entire table.


Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page
   

- Advertisement -