[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

SQL Server Replace Statement

Hey folks...

getting error on this....

update tblOffers
set [htmlContent]=Replace([htmlContent], 'http://www.domain1.com', 'http://www.domain2.com')
0
lrbrister
Asked:
lrbrister
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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..
0
 
ursangelCommented:
Please specify teh datatype of your column ur trying to update.
0
 
ursangelCommented:
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.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now