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
 General SQL Server Forums
 New to SQL Server Programming
 How to replace column text in SQL Table?

Author  Topic 

getur.srikanth@gmail.com
Yak Posting Veteran

77 Posts

Posted - 2011-02-15 : 20:29:48
I have column called CommPostCommUrl in table CommunitiesPostings has text value.

CommPostCommUrl
--------------------
http://communities.site.com/TIGS
http://communities.site.com/TIGS
http://communities.site.com/Leaders
http://communities.site.com/Specialty
http://communities.site.com/Specialty
http://communities.site.com/PN
http://communities.site.com/TIGS/SIM

Replace column text to

CommPostCommUrl
--------------------
http://communitiesdev.site.com/TIGS
http://communitiesdev.site.com/TIGS
http://communitiesdev.site.com/Leaders
http://communitiesdev.site.com/Specialty
http://communitiesdev.site.com/Specialty
http://communitiesdev.site.com/PN
http://communitiesdev.site.com/TIGS/SIM

Please provide me Query

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-02-15 : 20:57:18
UPDATE CommunitiesPostings SET CommPostCommUrl=REPLACE(CommPostCommUrl,'http://communities.','http://communitiesdev.')
Go to Top of Page
   

- Advertisement -