We help IT Professionals succeed at work.

SQL Server Replace Statement

Hey folks...

getting error on this....

update tblOffers
set [htmlContent]=Replace([htmlContent], 'http://www.domain1.com', 'http://www.domain2.com')
Watch Question

Billing Engineer
Most Valuable Expert 2014
Top Expert 2009
I guess, because your field is TEXT or NTEXT?
in which case, just change the field to VARCHAR(MAX) / NVARCHAR(MAX), and it should work

ps: posting the error would have been more helpful..

Please specify teh datatype of your column ur trying to update.

Please do specify the error ur getting while executing this statement. Usually replace will not allow the column name as the first argument.

Check it and let us know.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.