Udate SQL Statement

  • Thread starter Thread starter Newsgroup \(NNTP\)
  • Start date Start date
N

Newsgroup \(NNTP\)

I need to replace every instance of a word in our pagecontent table
with new terminology. I need help a script that can be used to mass
replace every occurrence of a word in PageContent. Doing a update
(UPDATE pagecontent SET contentshort = 'Deliverable' WHERE
contentshort Like '%Project%') will replace all the text in the field
to Deliverable. I would need to parse the ContentShort field for items
such as "Mike is a Project Manager" to change to "Mike is a
Deliverable Manager". (Deliverable is the new word for project.)
without taking out the rest of the word. (...is a)

Thanks,
Mike
 
If this is a one-time update, I would backup the table
and use the native Access replace utility. It is the
quick and dirty way.
I have a VBA function I use that does the same thing if
you want that, or you may look in the SQL Server news
groups for someone with a stored procedure or function
that does this on the server.
 
Back
Top