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
 SQL Server Development (2000)
 String

Author  Topic 

sardinka
Posting Yak Master

142 Posts

Posted - 2005-09-08 : 15:31:24
I have a field varchar(60), In some rows I have some text in it in some I don't have any text. I need to add to the existing text some new text and if there is no text add a new text only.
I do I do this?

nr
SQLTeam MVY

12543 Posts

Posted - 2005-09-08 : 15:35:59
Is it null at the moment?
update tbl set fld = coalesce(fld + ' ','') + 'some new text'


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -