Last post Feb 14, 2006 06:52 PM by Mariette
Feb 13, 2006 06:13 PM|RegGFX|LINK
What is the simplist way to Mass Replace a Companies Name inside of TEXT/HTML modules throughout a DNN 3.X site with out doing any damage to the site sql database itself.
I have to change the name of a company that is scatterd throughout some 40 or so pages located in various TEXT/HTML modules as content.
So what is a quick and painless way of doing this... rather than me going to each page each TEXT/HTML Module one at a time.
Please share strategies that have been used and actually work.... in other words if i had to find and mass replace "Joe's Cafe" to "Buckwheat's Cafe"
Any tips or SQL Queries to try or type or execute in SQL Manager would be great would be great.
Feb 14, 2006 11:41 AM|RegGFX|LINK
Has anyone ever had to overcome a similar issue?
Just looking for the most efficient way to handle a find and replace issue on such a large scale such as the inssue i'm up against.
Feb 14, 2006 12:42 PM|Mariette|LINK
Feb 14, 2006 01:06 PM|RegGFX|LINK
hmmm.. interesting. Not a bad approach.
May i ask which table specifically did you export as a text file?
Feb 14, 2006 01:50 PM|ErikVB|LINK
The guys at biforce created a great sql script for just this problem:
Feb 14, 2006 02:13 PM|RegGFX|LINK
[<:o)] YES!!! [:D]
Now thats fantastic.... I'll investigate this further.
Feb 14, 2006 04:00 PM|Mariette|LINK
I addition to this I decided to change the procedure in Kevin's example and make it work with News Articles from Scott:
One of the things you definetly don't want to do is search and replace text manually in a lot of articles. I decided to dig deeper into SQL, looked at other code that did similar things
and created code that alters text in NewsArticles.
As a gift to the community you can go to my blog at: Blog - Replacing text in News Articles:
The procedure is described there as well and can you download the stored procedure. I will also write a similar procedure for the summaries. For know I am going to enjoy my work
Feb 14, 2006 05:56 PM|RegGFX|LINK
I like this script approach too.. Thanks for sharing... you are tooooo kind.
I like the approach of executing the script inside of DNN SQL module.
However... I have one question. And i hope it doesn't sound too silly as i'm still kind a new at this manipulating SQL from a stored proc
In your proceedure code, How would i modify the proceedure to simply find and replace the text inside the HTMLTEXT table at the Desktophtml location.??????
Is it as simple as my changing DnnForge_NewsArticles_Page
to the HtmlText table and updating the Desktophtml column?
Feb 14, 2006 06:52 PM|Mariette|LINK
Erik gave you the link to the original procedure:
This can be used for text in the core DNN Text/HTML module.