Solved

Replace on an NTEXT field in Sql 2000

Posted on 2010-09-22
3
299 Views
Last Modified: 2012-05-10
Hi Folks,

I have ntext fields containing XML which are all longer than 4000 characters in a sql 2000 DB

I need to do the following replace on them:

update MyTable
Set SourceQuery = Replace(Replace(cast(SourceQuery as nvarchar(4000)), '<SCR>', '<PX>0</PX><SCR>'), '</Order>', ',PX</Order>')
Where SourceType = 'X334'

Without reinventing the wheel, how can I get this done ?

thanks

0
Comment
Question by:plq
3 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 33735621
0
 
LVL 8

Author Comment

by:plq
ID: 33735760
@anee... how does that help ? I don't know how to turn that into a solution that does the replace ??
0
 
LVL 11

Accepted Solution

by:
Larissa T earned 500 total points
ID: 33736056
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question