posted on Tuesday, November 06, 2007 2:28 PM |

I consulted a few of my friends after I failed to do my needed update for backwards image support due to the change in URL structure and found out I couldn't do what I wanted.

Here was the SQL I was planning on running:

begin tran
Update     subtext_Content
    Set    [text] = replace([text], '<img src="images/', '<img src="images/')

select * from subtext_Content where [text] like '%<img src="images/%'

As you can see, pretty straight forward, however it wouldn't work since the column data type for Text was an nText.  I used a transaction just incase I wanted to roll back.

My solution to this will be creating a small c# application that will loop through all the rows and then updates the rows.

Tags [ Ramblings ]

Your Comments.

No comments posted yet.

Post Comment
Title *
Name *
Email
Url
Comment *  
Please add 3 and 8 and type the answer here: