Solved

Replace on an NTEXT field in Sql 2000

Posted on 2010-09-22
3
273 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now